From 8391b9b130f1cf0358166dd4b5ee1f037abc7c0f Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Mon, 28 Mar 2005 15:29:37 +0000 Subject: [PATCH] * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Handle StackGhost. --- gdb/ChangeLog | 3 +++ gdb/sparc64nbsd-tdep.c | 14 ++++++++++++++ 2 files changed, 17 insertions(+) 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; -- 2.30.2