From: Andrew Cagney Date: Fri, 29 Oct 2004 14:00:58 +0000 (+0000) Subject: 2004-10-27 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=00b25ff323929eaa3b7ddaea20985a4174cf6381;p=binutils-gdb.git 2004-10-27 Andrew Cagney * trad-frame.c (trad_frame_get_prev_register): Use frame_unwind_register instead of frame_register_unwind, do not recurse the register's location. * xstormy16-tdep.c (xstormy16_frame_prev_register): * sparc-tdep.c (sparc32_frame_prev_register): Ditto. * sparc64-tdep.c (sparc64_frame_prev_register): Ditto. * sh-tdep.c (sh_frame_prev_register): Ditto. * m68k-tdep.c (m68k_frame_prev_register): Ditto. * i386-tdep.c (i386_frame_prev_register): Ditto. * dwarf2-frame.c (dwarf2_frame_prev_register): Ditto. * amd64-tdep.c (amd64_frame_prev_register): Ditto. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ca9fe4be110..cfce5eaf157 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,17 @@ +2004-10-27 Andrew Cagney + + * trad-frame.c (trad_frame_get_prev_register): Use + frame_unwind_register instead of frame_register_unwind, do not + recurse the register's location. + * xstormy16-tdep.c (xstormy16_frame_prev_register): + * sparc-tdep.c (sparc32_frame_prev_register): Ditto. + * sparc64-tdep.c (sparc64_frame_prev_register): Ditto. + * sh-tdep.c (sh_frame_prev_register): Ditto. + * m68k-tdep.c (m68k_frame_prev_register): Ditto. + * i386-tdep.c (i386_frame_prev_register): Ditto. + * dwarf2-frame.c (dwarf2_frame_prev_register): Ditto. + * amd64-tdep.c (amd64_frame_prev_register): Ditto. + 2004-10-28 Mark Kettenis * proc-events.c: Fix several coding-style issues. Consistently diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 90a4e11bed0..613022be2a0 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -898,8 +898,12 @@ amd64_frame_prev_register (struct frame_info *next_frame, void **this_cache, return; } - frame_register_unwind (next_frame, regnum, - optimizedp, lvalp, addrp, realnump, valuep); + *optimizedp = 0; + *lvalp = lval_register; + *addrp = 0; + *realnump = regnum; + if (valuep) + frame_unwind_register (next_frame, (*realnump), valuep); } static const struct frame_unwind amd64_frame_unwind = diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 005592c1994..0e1a9532a99 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -770,9 +770,12 @@ dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache, break; case DWARF2_FRAME_REG_SAVED_REG: - regnum = DWARF2_REG_TO_REGNUM (cache->reg[regnum].loc.reg); - frame_register_unwind (next_frame, regnum, - optimizedp, lvalp, addrp, realnump, valuep); + *optimizedp = 0; + *lvalp = lval_register; + *addrp = 0; + *realnump = DWARF2_REG_TO_REGNUM (cache->reg[regnum].loc.reg); + if (valuep) + frame_unwind_register (next_frame, (*realnump), valuep); break; case DWARF2_FRAME_REG_SAVED_EXP: @@ -797,13 +800,21 @@ dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache, "undefined"). Code above issues a complaint about this. Here just fudge the books, assume GCC, and that the value is more inner on the stack. */ - frame_register_unwind (next_frame, regnum, - optimizedp, lvalp, addrp, realnump, valuep); + *optimizedp = 0; + *lvalp = lval_register; + *addrp = 0; + *realnump = regnum; + if (valuep) + frame_unwind_register (next_frame, (*realnump), valuep); break; case DWARF2_FRAME_REG_SAME_VALUE: - frame_register_unwind (next_frame, regnum, - optimizedp, lvalp, addrp, realnump, valuep); + *optimizedp = 0; + *lvalp = lval_register; + *addrp = 0; + *realnump = regnum; + if (valuep) + frame_unwind_register (next_frame, (*realnump), valuep); break; case DWARF2_FRAME_REG_CFA: diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index d5cd111c901..e001c3e10e1 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -984,8 +984,12 @@ i386_frame_prev_register (struct frame_info *next_frame, void **this_cache, if (regnum == I386_EIP_REGNUM && cache->pc_in_eax) { - frame_register_unwind (next_frame, I386_EAX_REGNUM, - optimizedp, lvalp, addrp, realnump, valuep); + *optimizedp = 0; + *lvalp = lval_register; + *addrp = 0; + *realnump = I386_EAX_REGNUM; + if (valuep) + frame_unwind_register (next_frame, (*realnump), valuep); return; } @@ -1018,8 +1022,12 @@ i386_frame_prev_register (struct frame_info *next_frame, void **this_cache, return; } - frame_register_unwind (next_frame, regnum, - optimizedp, lvalp, addrp, realnump, valuep); + *optimizedp = 0; + *lvalp = lval_register; + *addrp = 0; + *realnump = regnum; + if (valuep) + frame_unwind_register (next_frame, (*realnump), valuep); } static const struct frame_unwind i386_frame_unwind = diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 1ada90a4488..cb2bb10adc8 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -862,8 +862,12 @@ m68k_frame_prev_register (struct frame_info *next_frame, void **this_cache, return; } - frame_register_unwind (next_frame, regnum, - optimizedp, lvalp, addrp, realnump, valuep); + *optimizedp = 0; + *lvalp = lval_register; + *addrp = 0; + *realnump = regnum; + if (valuep) + frame_unwind_register (next_frame, (*realnump), valuep); } static const struct frame_unwind m68k_frame_unwind = diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 48e994d4e2e..a745e44fe3e 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -2363,8 +2363,12 @@ sh_frame_prev_register (struct frame_info *next_frame, void **this_cache, return; } - frame_register_unwind (next_frame, regnum, - optimizedp, lvalp, addrp, realnump, valuep); + *optimizedp = 0; + *lvalp = lval_register; + *addrp = 0; + *realnump = regnum; + if (valuep) + frame_unwind_register (next_frame, (*realnump), valuep); } static void diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 7fbd9de62b0..1af5b598b48 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -763,8 +763,12 @@ sparc32_frame_prev_register (struct frame_info *next_frame, void **this_cache, && regnum >= SPARC_O0_REGNUM && regnum <= SPARC_O7_REGNUM) regnum += (SPARC_I0_REGNUM - SPARC_O0_REGNUM); - frame_register_unwind (next_frame, regnum, - optimizedp, lvalp, addrp, realnump, valuep); + *optimizedp = 0; + *lvalp = lval_register; + *addrp = 0; + *realnump = regnum; + if (valuep) + frame_unwind_register (next_frame, (*realnump), valuep); } static const struct frame_unwind sparc32_frame_unwind = diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index a4398d57adb..1d925188f29 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -544,8 +544,12 @@ sparc64_frame_prev_register (struct frame_info *next_frame, void **this_cache, && regnum >= SPARC_O0_REGNUM && regnum <= SPARC_O7_REGNUM) regnum += (SPARC_I0_REGNUM - SPARC_O0_REGNUM); - frame_register_unwind (next_frame, regnum, - optimizedp, lvalp, addrp, realnump, valuep); + *optimizedp = 0; + *lvalp = lval_register; + *addrp = 0; + *realnump = regnum; + if (valuep) + frame_unwind_register (next_frame, regnum, valuep); } static const struct frame_unwind sparc64_frame_unwind = diff --git a/gdb/trad-frame.c b/gdb/trad-frame.c index b9ee2e15e8e..fc67db860fa 100644 --- a/gdb/trad-frame.c +++ b/gdb/trad-frame.c @@ -145,9 +145,13 @@ trad_frame_get_prev_register (struct frame_info *next_frame, } else if (trad_frame_realreg_p (this_saved_regs, regnum)) { + *optimizedp = 0; + *lvalp = lval_register; + *addrp = 0; + *realregp = this_saved_regs[regnum].realreg; /* Ask the next frame to return the value of the register. */ - frame_register_unwind (next_frame, this_saved_regs[regnum].realreg, - optimizedp, lvalp, addrp, realregp, bufferp); + if (bufferp) + frame_unwind_register (next_frame, (*realregp), bufferp); } else if (trad_frame_value_p (this_saved_regs, regnum)) { diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 28f5d002af6..086566fd5a2 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -712,8 +712,12 @@ xstormy16_frame_prev_register (struct frame_info *next_frame, void **this_cache, return; } - frame_register_unwind (next_frame, regnum, - optimizedp, lvalp, addrp, realnump, valuep); + *optimizedp = 0; + *lvalp = lval_register; + *addrp = 0; + *realnump = regnum; + if (valuep) + frame_unwind_register (next_frame, (*realnump), valuep); } static void