From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <3yLAbWAMKCl8AGBDLLDIB.9LJNBJR-ABSBIKLKDKR.LOD@flex--dje.bounces.google.com>) id 1c2Psa-0006gR-AK for qemu-devel@nongnu.org; Thu, 03 Nov 2016 17:49:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <3yLAbWAMKCl8AGBDLLDIB.9LJNBJR-ABSBIKLKDKR.LOD@flex--dje.bounces.google.com>) id 1c2PsZ-0002mz-Jx for qemu-devel@nongnu.org; Thu, 03 Nov 2016 17:49:00 -0400 Received: from mail-pa0-x249.google.com ([2607:f8b0:400e:c03::249]:35893) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <3yLAbWAMKCl8AGBDLLDIB.9LJNBJR-ABSBIKLKDKR.LOD@flex--dje.bounces.google.com>) id 1c2PsZ-0002kw-DG for qemu-devel@nongnu.org; Thu, 03 Nov 2016 17:48:59 -0400 Received: by mail-pa0-x249.google.com with SMTP id xn9so302289pac.3 for ; Thu, 03 Nov 2016 14:48:57 -0700 (PDT) MIME-Version: 1.0 Message-ID: <94eb2c187eda43dba005406c86f7@google.com> Date: Thu, 03 Nov 2016 21:48:56 +0000 From: Doug Evans Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Subject: [Qemu-devel] [PATCH] Document how x86 gdb_num_core_regs is computed. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, pbonzini@redhat.com Hi. It helps when reading the code to see how the number is arrived at. Signed-off-by: Doug Evans --- target-i386/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 14c5186..01f1ab0 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -3721,6 +3721,8 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data) cc->write_elf32_qemunote = x86_cpu_write_elf32_qemunote; cc->vmsd = &vmstate_x86_cpu; #endif + /* CPU_NB_REGS * 2 = general regs + xmm regs + 25 = eip, eflags, 6 seg regs, st[0-7], fctrl,...,fop, mxcsr */ cc->gdb_num_core_regs = CPU_NB_REGS * 2 + 25; #ifndef CONFIG_USER_ONLY cc->debug_excp_handler = breakpoint_handler; --