From: Mark Kettenis Date: Mon, 28 Mar 2005 15:29:37 +0000 (+0000) Subject: * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Handle X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8391b9b130f1cf0358166dd4b5ee1f037abc7c0f;p=binutils-gdb.git * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Handle StackGhost. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 88abf013cf7..077796a8849 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2005-03-28 Mark Kettenis + * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Handle + StackGhost. + * sparc-tdep.c (sparc_supply_rwindow, sparc_collect_rwindow): Handle StackGhost in 64-bit code. * sparc64-tdep.c (sparc64_frame_prev_register): Handle StackGhost. diff --git a/gdb/sparc64nbsd-tdep.c b/gdb/sparc64nbsd-tdep.c index 7d4b1933767..29b1379e10d 100644 --- a/gdb/sparc64nbsd-tdep.c +++ b/gdb/sparc64nbsd-tdep.c @@ -133,6 +133,20 @@ sparc64nbsd_sigcontext_saved_regs (CORE_ADDR sigcontext_addr, regnum <= SPARC_I7_REGNUM; regnum++, addr += 8) saved_regs[regnum].addr = addr; + /* Handle StackGhost. */ + { + ULONGEST wcookie = sparc_fetch_wcookie (); + + if (wcookie != 0) + { + ULONGEST i7; + + addr = saved_regs[SPARC_I7_REGNUM].addr; + i7 = get_frame_memory_unsigned (next_frame, addr, 8); + trad_frame_set_value (saved_regs, SPARC_I7_REGNUM, i7 ^ wcookie); + } + } + /* TODO: Handle the floating-point registers. */ return saved_regs;