All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH] Document how x86 gdb_num_core_regs is computed.
Date: Thu, 03 Nov 2016 21:48:56 +0000	[thread overview]
Message-ID: <94eb2c187eda43dba005406c86f7@google.com> (raw)

Hi.

It helps when reading the code to see how the number is arrived at.

Signed-off-by: Doug Evans <dje@google.com>
---
  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;
-- 

             reply	other threads:[~2016-11-03 21:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-03 21:48 Doug Evans [this message]
2016-11-08  0:20 ` [Qemu-devel] [PATCH] Document how x86 gdb_num_core_regs is computed Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=94eb2c187eda43dba005406c86f7@google.com \
    --to=dje@google.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.