aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/mmu-radix64.h
diff options
context:
space:
mode:
authorFabiano Rosas <farosas@linux.ibm.com>2019-02-06 14:51:33 -0200
committerDavid Gibson <david@gibson.dropbear.id.au>2019-02-17 21:54:02 +1100
commit707c7c2ee1f6fb425a3c78f587feda7cd8501905 (patch)
tree9129262e3c0b7f8dd05f63df3f62c8d7ab7ae078 /target/ppc/mmu-radix64.h
parent5c7adcf422d4bd7235e0d2f2f85efcc393795fb2 (diff)
target/ppc: Enable reporting of SPRs to GDB
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 The `info` command can also be used: (gdb) info registers spr For this purpose, GDB needs to be provided with an XML description of the registers (see the gdb-xml directory for examples) and a set of callbacks for reading and writing the registers must be defined. The XML file in this case is created dynamically, based on the SPRs already defined in the machine. This way we avoid the need for several XML files to suit each possible ppc machine. The gdb_{get,set}_spr_reg callbacks take an index based on the order the registers appear in the XML file. This index does not match the actual location of the registers in the env->spr array so the gdb_find_spr_idx function does that conversion. Note: GDB currently needs to know the guest endianness in order to properly print the registers values. This is done automatically by GDB when provided with the ELF file or explicitly with the `set endian <big|little>` command. Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/mmu-radix64.h')
0 files changed, 0 insertions, 0 deletions