From 8693c4197209e0a4d6333aa5e92db134c3c1cd6a Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 30 May 2004 14:11:00 +0000 Subject: [PATCH] * hppa-tdep.c (hppa_frame_prev_register_helper): Reimplement to handle VALUEP being null. --- gdb/ChangeLog | 3 +++ gdb/hppa-tdep.c | 31 +++++++++++++++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7cf96c52531..f6c21d87ded 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2004-05-30 Mark Kettenis + * hppa-tdep.c (hppa_frame_prev_register_helper): Reimplement to + handle VALUEP being null. + * regset.h (collect_regset_ftype): Unconstify fourth argument. 2004-05-29 Mark Kettenis diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index e2653d73fc6..d219429b2b7 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -2316,20 +2316,32 @@ hppa_frame_prev_register_helper (struct frame_info *next_frame, enum lval_type *lvalp, CORE_ADDR *addrp, int *realnump, void *valuep) { - int pcoqt = (regnum == HPPA_PCOQ_TAIL_REGNUM); - struct gdbarch *gdbarch = get_frame_arch (next_frame); - int regsize = register_size (gdbarch, HPPA_PCOQ_HEAD_REGNUM); + if (regnum == HPPA_PCOQ_TAIL_REGNUM) + { + if (valuep) + { + CORE_ADDR pc; - if (pcoqt) - regnum = HPPA_PCOQ_HEAD_REGNUM; + trad_frame_prev_register (next_frame, saved_regs, + HPPA_PCOQ_HEAD_REGNUM, optimizedp, + lvalp, addrp, realnump, valuep); + + pc = extract_unsigned_integer (valuep, 4); + store_unsigned_integer (valuep, 4, pc + 4); + } + + /* It's a computed value. */ + *optimizedp = 0; + *lvalp = not_lval; + *addrp = 0; + *realnump = -1; + return; + } trad_frame_prev_register (next_frame, saved_regs, regnum, optimizedp, lvalp, addrp, realnump, valuep); - - if (pcoqt) - store_unsigned_integer (valuep, regsize, - extract_unsigned_integer (valuep, regsize) + 4); } + /* Here is a table of C type sizes on hppa with various compiles and options. I measured this on PA 9000/800 with HP-UX 11.11 @@ -2559,4 +2571,3 @@ be no argument or the argument must be a depth.\n"), NULL); &hppa_debug, "Set hppa debugging.\n\ When non-zero, hppa specific debugging is enabled.", &setdebuglist), &showdebuglist); } - -- 2.30.2