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 v2 0/3] ppc/gdbstub: Expose SPRs to GDB
Date: Mon, 14 Jan 2019 13:41:09 -0200 [thread overview]
Message-ID: <20190114154113.6188-1-farosas@linux.ibm.com> (raw)
This series implements the reading and writing of Special Purpose
Registers in PPC's gdbstub.
How it works generally [1]:
GDB asks for the target.xml file which contains the target description
along with the list of available feature XMLs. GDB then asks for each
of the XML files in sequence.
The XML files contain a list of registers descriptions:
<reg name="msr" bitsize="64" type="uint64"/>
When the user tries to access a register, GDB reads the XML file in
sequence and sends QEMU the number of the register. This number is
sequential across all feature files.
The index provided by GDB must be converted by QEMU to match QEMU's
internal representation.
A set of callbacks are implemented to read/write the register.
In this series:
The first patch implements the dynamic generation of the power-spr.xml
file. Making it dynamically facilitates converting the GDB index to an
index useful for addressing the env->spr array.
The second patch implements the gdb_{get,set}_spr_reg callbacks along
with the convertion from GDB index to QEMU index.
The third patch enables the functionality.
https://sourceware.org/gdb/current/onlinedocs/gdb/Target-Descriptions.html
v1 -> v2:
- patch 1: explicitly store the gdb_id and add comment explaining why
we need it
- patch 2: use gdb_id to find the correct env->spr array's index
https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg00648.html
Fabiano Rosas (3):
target/ppc: Add SPRs XML generation code for gdbstub
target/ppc: Add GDB callbacks for SPRs
target/ppc: Enable reporting of SPRs to GDB
target/ppc/cpu.h | 8 +++++
target/ppc/gdbstub.c | 54 ++++++++++++++++++++++++++++++
target/ppc/translate_init.inc.c | 58 +++++++++++++++++++++++++++++++--
3 files changed, 118 insertions(+), 2 deletions(-)
--
2.17.1
next reply other threads:[~2019-01-14 15:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-14 15:41 Fabiano Rosas [this message]
2019-01-14 15:41 ` [Qemu-devel] [PATCH v2 1/3] target/ppc: Add SPRs XML generation code for gdbstub Fabiano Rosas
2019-01-14 15:41 ` [Qemu-devel] [PATCH v2 2/3] target/ppc: Add GDB callbacks for SPRs Fabiano Rosas
2019-01-15 19:10 ` Fabiano Rosas
2019-01-16 5:11 ` Alexey Kardashevskiy
2019-01-14 15:41 ` [Qemu-devel] [PATCH v2 3/3] target/ppc: Enable reporting of SPRs to GDB Fabiano Rosas
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=20190114154113.6188-1-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).