Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/dist/toolchain/gdb Correctly decode the switchframe *and...
details: https://anonhg.NetBSD.org/src/rev/c15b5d95ef43
branches: trunk
changeset: 550648:c15b5d95ef43
user: matt <matt%NetBSD.org@localhost>
date: Fri Aug 15 16:58:15 2003 +0000
description:
Correctly decode the switchframe *and the two callframes above it* which
contain the real information.
diffstat:
gnu/dist/toolchain/gdb/ppcnbsd-nat.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 5de9c37af9dd -r c15b5d95ef43 gnu/dist/toolchain/gdb/ppcnbsd-nat.c
--- a/gnu/dist/toolchain/gdb/ppcnbsd-nat.c Fri Aug 15 15:24:21 2003 +0000
+++ b/gnu/dist/toolchain/gdb/ppcnbsd-nat.c Fri Aug 15 16:58:15 2003 +0000
@@ -232,6 +232,7 @@
struct pcb *pcb;
{
struct switchframe sf;
+ struct callframe cf;
int regno;
/*
@@ -240,12 +241,18 @@
*/
if (target_read_memory(pcb->pcb_sp, (char *)&sf, sizeof(sf)))
error("Cannot read switchframe.");
- supply_register(1, (char *)&pcb->pcb_sp);
supply_register(2, (char *)&sf.fixreg2);
- supply_register(PC_REGNUM, (char *)&sf.lr);
- supply_register(LR_REGNUM, (char *)&sf.lr);
supply_register(CR_REGNUM, (char *)&sf.cr);
for (regno = 13; regno < 32; regno++)
supply_register(regno, (char *)&sf.fixreg[regno - 13]);
+ if (target_read_memory(sf.sp, (char *)&cf, sizeof(cf)))
+ error("Cannot read callframe.");
+ supply_register(30, (char *)&cf.r30);
+ supply_register(31, (char *)&cf.r31);
+ supply_register(1, (char *)&cf.sp);
+ if (target_read_memory(cf.sp, (char *)&cf, sizeof(cf)))
+ error("Cannot read switchframe.");
+ supply_register(PC_REGNUM, (char *)&cf.lr);
+ supply_register(LR_REGNUM, (char *)&cf.lr);
}
#endif /* FETCH_KCORE_REGISTERS */
Home |
Main Index |
Thread Index |
Old Index