diff options
author | marcel <marcel@FreeBSD.org> | 2013-05-21 18:00:47 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2013-05-21 18:00:47 +0000 |
commit | 075c3eda472bf38f7728bc1b95cd32b998c524b9 (patch) | |
tree | f1faaed88c6b9110de1f0cb2a0b2d78354bf677c | |
parent | 42ec29f8c344a7d7a58bc2953226836a48450d59 (diff) | |
download | FreeBSD-src-075c3eda472bf38f7728bc1b95cd32b998c524b9.zip FreeBSD-src-075c3eda472bf38f7728bc1b95cd32b998c524b9.tar.gz |
Fix the PowerPC Book-E register definitions used by the remote GDB
protocol.
Obtained from: Juniper Networks, Inc.
-rw-r--r-- | sys/powerpc/include/gdb_machdep.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/powerpc/include/gdb_machdep.h b/sys/powerpc/include/gdb_machdep.h index 7e36e97..0b81db5 100644 --- a/sys/powerpc/include/gdb_machdep.h +++ b/sys/powerpc/include/gdb_machdep.h @@ -29,11 +29,20 @@ #ifndef _MACHINE_GDB_MACHDEP_H_ #define _MACHINE_GDB_MACHDEP_H_ +#ifdef BOOKE +#define PPC_GDB_NREGS0 1 +#define PPC_GDB_NREGS4 (70 + 1) +#define PPC_GDB_NREGS8 (1 + 32) +#define PPC_GDB_NREGS16 0 +#else +#define PPC_GDB_NREGS0 0 #define PPC_GDB_NREGS4 (32 + 7 + 2) #define PPC_GDB_NREGS8 32 #define PPC_GDB_NREGS16 32 +#endif -#define GDB_NREGS (PPC_GDB_NREGS4 + PPC_GDB_NREGS8 + PPC_GDB_NREGS16) +#define GDB_NREGS (PPC_GDB_NREGS0 + PPC_GDB_NREGS4 + \ + PPC_GDB_NREGS8 + PPC_GDB_NREGS16) #define GDB_REG_PC 64 #define GDB_BUFSZ (PPC_GDB_NREGS4 * 8 + \ @@ -44,10 +53,17 @@ static __inline size_t gdb_cpu_regsz(int regnum) { +#ifdef BOOKE + if (regnum == 70) + return (0); + if (regnum == 71 || regnum >= 73) + return (8); +#else if (regnum >= 32 && regnum <= 63) return (8); if (regnum >= 71 && regnum <= 102) return (16); +#endif return (4); } |