diff options
author | Mark Kettenis <kettenis@gnu.org> | 2005-03-28 13:42:49 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2005-03-28 13:42:49 +0000 |
commit | f700a3641b8311d5b1a84f35a5d1a636dcb33f38 (patch) | |
tree | 138d6b1e53d980a700ed22855dda0cc0925b7039 /gdb/sparc-tdep.c | |
parent | 5810296be62760e74b4170e0f8bb778a636a0e3e (diff) | |
download | gdb-f700a3641b8311d5b1a84f35a5d1a636dcb33f38.zip gdb-f700a3641b8311d5b1a84f35a5d1a636dcb33f38.tar.gz gdb-f700a3641b8311d5b1a84f35a5d1a636dcb33f38.tar.bz2 |
* sparc-tdep.c (sparc_supply_rwindow, sparc_collect_rwindow):
Handle StackGhost in 64-bit code.
* sparc64-tdep.c (sparc64_frame_prev_register): Handle StackGhost.
Diffstat (limited to 'gdb/sparc-tdep.c')
-rw-r--r-- | gdb/sparc-tdep.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index f9ded35..dcae045 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1272,6 +1272,16 @@ sparc_supply_rwindow (struct regcache *regcache, CORE_ADDR sp, int regnum) if (regnum == i || regnum == -1) { target_read_memory (sp + ((i - SPARC_L0_REGNUM) * 8), buf, 8); + + /* Handle StackGhost. */ + if (i == SPARC_I7_REGNUM) + { + ULONGEST wcookie = sparc_fetch_wcookie (); + ULONGEST i7 = extract_unsigned_integer (buf + offset, 8); + + store_unsigned_integer (buf + offset, 8, i7 ^ wcookie); + } + regcache_raw_supply (regcache, i, buf); } } @@ -1330,6 +1340,16 @@ sparc_collect_rwindow (const struct regcache *regcache, if (regnum == -1 || regnum == SPARC_SP_REGNUM || regnum == i) { regcache_raw_collect (regcache, i, buf); + + /* Handle StackGhost. */ + if (i == SPARC_I7_REGNUM) + { + ULONGEST wcookie = sparc_fetch_wcookie (); + ULONGEST i7 = extract_unsigned_integer (buf + offset, 8); + + store_unsigned_integer (buf, 8, i7 ^ wcookie); + } + target_write_memory (sp + ((i - SPARC_L0_REGNUM) * 8), buf, 8); } } |