qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] ppc/gdbstub: Expose SPRs to GDB
@ 2019-01-04 19:56 Fabiano Rosas
  2019-01-04 19:56 ` [Qemu-devel] [PATCH 1/3] target/ppc: Add SPRs XML generation code for gdbstub Fabiano Rosas
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Fabiano Rosas @ 2019-01-04 19:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-ppc

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 looks for the register
name in the XML file and sends QEMU the index of the register. This
index 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.

1- https://sourceware.org/gdb/current/onlinedocs/gdb/Target-Descriptions.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                |  7 ++++
 target/ppc/gdbstub.c            | 45 +++++++++++++++++++++++++
 target/ppc/translate_init.inc.c | 59 +++++++++++++++++++++++++++++++--
 3 files changed, 109 insertions(+), 2 deletions(-)

--
2.17.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-11  1:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-04 19:56 [Qemu-devel] [PATCH 0/3] ppc/gdbstub: Expose SPRs to GDB Fabiano Rosas
2019-01-04 19:56 ` [Qemu-devel] [PATCH 1/3] target/ppc: Add SPRs XML generation code for gdbstub Fabiano Rosas
2019-01-04 19:56 ` [Qemu-devel] [PATCH 2/3] target/ppc: Add GDB callbacks for SPRs Fabiano Rosas
2019-01-11  0:50   ` David Gibson
2019-01-04 19:56 ` [Qemu-devel] [PATCH 3/3] target/ppc: Enable reporting of SPRs to GDB Fabiano Rosas

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).