This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
How can I figure out the register numbers for a remote target stub?
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: gdb at sourceware dot org
- Date: Wed, 29 Nov 2017 11:39:41 +0100
- Subject: How can I figure out the register numbers for a remote target stub?
- Authentication-results: sourceware.org; auth=none
Hello,
I would like to extend the RTEMS GDB remote target stub to support
PowerPC (e500, e6500). In the ARM support we have some magic register
numbers:
https://git.rtems.org/rtems/tree/cpukit/libdebugger/rtems-debugger-arm.c#n132
|/* * Debugger registers layout. */ #define REG_R0 0 #define REG_R1 1
#define REG_R2 2 #define REG_R3 3 #define REG_R4 4 #define REG_R5 5
#define REG_R6 6 #define REG_R7 7 #define REG_R8 8 #define REG_R9 9
#define REG_R10 10 #define REG_R11 11 #define REG_R12 12 #define REG_SP
13 #define REG_LR 14 #define REG_PC 15 #define REG_CPSR 25 How can I
find the corresponding numbers for the PowerPC? There is a comment in
(gdb/ppc-tdep.h): /* Register number constants. These are GDB internal
register numbers; they are not used for the simulator or remote targets.
Extra SPRs (those other than MQ, CTR, LR, XER, SPEFSCR) are given
numbers above PPC_NUM_REGS. So are segment registers and other
target-defined registers. */ enum { PPC_R0_REGNUM = 0, PPC_F0_REGNUM =
32, I cannot find the numbers which are used for remote targets. Are
they defined by the XML files in gdb/features/rs6000? |
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.