From: Fabiano Rosas <farosas@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, david@gibson.dropbear.id.au
Subject: [Qemu-devel] [PATCH v3 3/3] target/ppc: Enable reporting of SPRs to GDB
Date: Tue, 15 Jan 2019 17:37:50 -0200 [thread overview]
Message-ID: <20190115193750.17234-4-farosas@linux.ibm.com> (raw)
In-Reply-To: <20190115193750.17234-1-farosas@linux.ibm.com>
This allows reading and writing of SPRs via GDB:
(gdb) p/x $srr1
$1 = 0x8000000002803033
(gdb) p/x $pvr
$2 = 0x4b0201
(gdb) set $pvr=0x4b0000
(gdb) p/x $pvr
$3 = 0x4b0000
They can also be shown as a group:
(gdb) info reg spr
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
---
target/ppc/translate_init.inc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c
index 9c6c935204..ebf202e54d 100644
--- a/target/ppc/translate_init.inc.c
+++ b/target/ppc/translate_init.inc.c
@@ -10527,7 +10527,9 @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data)
#endif
cc->gdb_num_core_regs = 71;
-
+#ifndef CONFIG_USER_ONLY
+ cc->gdb_get_dynamic_xml = ppc_gdb_get_dynamic_xml;
+#endif
#ifdef USE_APPLE_GDB
cc->gdb_read_register = ppc_cpu_gdb_read_register_apple;
cc->gdb_write_register = ppc_cpu_gdb_write_register_apple;
--
2.17.1
next prev parent reply other threads:[~2019-01-15 19:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 19:37 [Qemu-devel] [PATCH v3 0/3] ppc/gdbstub: Expose SPRs to GDB Fabiano Rosas
2019-01-15 19:37 ` [Qemu-devel] [PATCH v3 1/3] target/ppc: Add SPRs XML generation code for gdbstub Fabiano Rosas
2019-01-17 12:14 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2019-01-17 16:11 ` Fabiano Rosas
2019-01-15 19:37 ` [Qemu-devel] [PATCH v3 2/3] target/ppc: Add GDB callbacks for SPRs Fabiano Rosas
2019-01-15 19:37 ` Fabiano Rosas [this message]
2019-01-21 5:51 ` [Qemu-devel] [PATCH v3 0/3] ppc/gdbstub: Expose SPRs to GDB no-reply
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=20190115193750.17234-4-farosas@linux.ibm.com \
--to=farosas@linux.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).