qemu-e2k/target
Fabiano Rosas 707c7c2ee1 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>
2019-02-17 21:54:02 +11:00
..
alpha avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
arm target/arm: Add missing clear_tail calls 2019-02-15 09:56:41 +00:00
cris avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
hppa target/hppa: fix dcor instruction 2019-02-12 08:59:21 -08:00
i386 * cpu-exec fixes (Emilio, Laurent) 2019-02-05 19:39:22 +00:00
lm32
m68k target/m68k: Fix LGPL information in the file headers 2019-01-30 14:20:13 +01:00
microblaze target/microblaze: Add props enabling exceptions on failed bus accesses 2019-01-22 03:17:34 -08:00
mips target/mips: introduce MTTCG-enabled builds 2019-02-14 17:47:28 +01:00
moxie target/moxie: Fix LGPL information in the file headers 2019-02-06 15:46:11 +01:00
nios2
openrisc target/openrisc: Fix LGPL version number 2019-01-30 11:01:36 +01:00
ppc target/ppc: Enable reporting of SPRs to GDB 2019-02-17 21:54:02 +11:00
riscv target/riscv: fix counter-enable checks in ctr() 2019-02-11 15:56:22 -08:00
s390x s390x/tcg: Don't model FP registers as globals 2019-02-04 18:32:17 +01:00
sh4 sh4: fix use_icount with linux-user 2018-08-20 00:11:06 +02:00
sparc qdev-props: remove errp from GlobalProperty 2019-01-07 16:18:42 +04:00
tilegx avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
tricore target/tricore: Fix LGPL version number 2019-01-30 11:01:46 +01:00
unicore32 target/unicore32: remove tlb_flush from uc32_init_fn 2018-10-18 18:58:10 -07:00
xtensa target/xtensa: add test_mmuhifi_c3 core 2019-01-28 11:55:20 -08:00