* sparc-tdep.c (sparc_frame_cache): Adjust cached frame base
authorMark Kettenis <kettenis@gnu.org>
Wed, 9 Mar 2005 22:08:13 +0000 (22:08 +0000)
committerMark Kettenis <kettenis@gnu.org>
Wed, 9 Mar 2005 22:08:13 +0000 (22:08 +0000)
address for 64-bit code.
(sparc_unwind_dummy_id): Likewise.
* sparc64-tdep.c (sparc64_frame_prev_register): Adjust for new
frame base address convention.
(sparc64_push_dummy_call): Likewise.
* sparc64nbsd-tdep.c: Update copyright year.
(sparc64nbsd_sigcontext_frame_cache): Adjust cached frame base
address for 64-bit code.
(sparc64nbsd_init_abi): Tweak comment.
* sparc64obsd-tdep.c: Update copyright year.
(sparc64obsd_frame_cache): Adjust cached frame base address for
64-bit code.
(sparc64obsd_init_abi): Tweak comment.

gdb/ChangeLog
gdb/sparc-tdep.c
gdb/sparc64-tdep.c
gdb/sparc64nbsd-tdep.c
gdb/sparc64obsd-tdep.c

index bed4021e3169628fc63ddd265054e533fb78432f..eb480af2c371f3b5b821fd99291ba0c75937833a 100644 (file)
@@ -1,3 +1,20 @@
+2005-03-09  Mark Kettenis  <kettenis@gnu.org>
+
+       * sparc-tdep.c (sparc_frame_cache): Adjust cached frame base
+       address for 64-bit code.
+       (sparc_unwind_dummy_id): Likewise.
+       * sparc64-tdep.c (sparc64_frame_prev_register): Adjust for new
+       frame base address convention.
+       (sparc64_push_dummy_call): Likewise.
+       * sparc64nbsd-tdep.c: Update copyright year.
+       (sparc64nbsd_sigcontext_frame_cache): Adjust cached frame base
+       address for 64-bit code.
+       (sparc64nbsd_init_abi): Tweak comment.
+       * sparc64obsd-tdep.c: Update copyright year.
+       (sparc64obsd_frame_cache): Adjust cached frame base address for
+       64-bit code.
+       (sparc64obsd_init_abi): Tweak comment.
+
 2005-03-09  Corinna Vinschen  <vinschen@redhat.com>
 
        * exceptions.h (TRY_CATCH): Define setjmp/sigsetjmp macro safe.
index 0bcdd48402d282cd185ddfcbcf84b7fb9633a9cb..f9ded35d1d0354bea0de7502fbaf7fe748b28af3 100644 (file)
@@ -673,6 +673,9 @@ sparc_frame_cache (struct frame_info *next_frame, void **this_cache)
        frame_unwind_register_unsigned (next_frame, SPARC_FP_REGNUM);
     }
 
+  if (cache->base & 1)
+    cache->base += BIAS;
+
   return cache;
 }
 
@@ -859,6 +862,8 @@ sparc_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
   CORE_ADDR sp;
 
   sp = frame_unwind_register_unsigned (next_frame, SPARC_SP_REGNUM);
+  if (sp & 1)
+    sp += BIAS;
   return frame_id_build (sp, frame_pc_unwind (next_frame));
 }
 \f
index fbef9a9707c608db03daa81a663f065bf1359406..f8087b409bdefb583adcc4465192be7c503148b5 100644 (file)
@@ -526,7 +526,7 @@ sparc64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
     {
       *optimizedp = 0;
       *lvalp = lval_memory;
-      *addrp = cache->base + BIAS + (regnum - SPARC_L0_REGNUM) * 8;
+      *addrp = cache->base + (regnum - SPARC_L0_REGNUM) * 8;
       *realnump = -1;
       if (valuep)
        {
@@ -572,7 +572,7 @@ sparc64_frame_base_address (struct frame_info *next_frame, void **this_cache)
   struct sparc_frame_cache *cache =
     sparc64_frame_cache (next_frame, this_cache);
 
-  return cache->base + BIAS;
+  return cache->base;
 }
 
 static const struct frame_base sparc64_frame_base =
@@ -973,7 +973,7 @@ sparc64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
   /* Finally, update the stack pointer.  */
   regcache_cooked_write_unsigned (regcache, SPARC_SP_REGNUM, sp);
 
-  return sp;
+  return sp + BIAS;
 }
 \f
 
index e02ee3ae6d97422eb6f077983bba8a54b9812de5..7d4b19337677d4bba521299baf13dec7e4b2d6a0 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for NetBSD/sparc64.
 
-   Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    Based on code contributed by Wasabi Systems, Inc.
 
    This file is part of GDB.
@@ -161,12 +161,14 @@ sparc64nbsd_sigcontext_frame_cache (struct frame_info *next_frame,
          initialized under the assumption that we're frameless.  */
       cache->frameless_p = 0;
       addr = frame_unwind_register_unsigned (next_frame, SPARC_FP_REGNUM);
+      if (addr & 1)
+       addr += BIAS;
       cache->base = addr;
     }
 
   /* We find the appropriate instance of `struct sigcontext' at a
      fixed offset in the signal frame.  */
-  addr = cache->base + BIAS + 128 + 8;
+  addr = cache->base + 128 + 8;
   cache->saved_regs = sparc64nbsd_sigcontext_saved_regs (addr, next_frame);
 
   return cache;
@@ -237,13 +239,13 @@ sparc64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 
   sparc64_init_abi (info, gdbarch);
 
-  /* NetBSD/sparc64 has SVR4-style shared libraries...  */
+  /* NetBSD/sparc64 has SVR4-style shared libraries.  */
   set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
   set_solib_svr4_fetch_link_map_offsets
     (gdbarch, svr4_lp64_fetch_link_map_offsets);
 }
-
 \f
+
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 void _initialize_sparc64nbsd_tdep (void);
 
index 18e0416c94bad18c29eeb5511820fe04618dc221..194655645e556bdda4aceee25300680188148c52 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for OpenBSD/sparc64.
 
-   Copyright 2004 Free Software Foundation, Inc.
+   Copyright 2004, 2005 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -133,12 +133,14 @@ sparc64obsd_frame_cache (struct frame_info *next_frame, void **this_cache)
          initialized under the assumption that we're frameless.  */
       cache->frameless_p = 0;
       addr = frame_unwind_register_unsigned (next_frame, SPARC_FP_REGNUM);
+      if (addr & 1)
+       addr += BIAS;
       cache->base = addr;
     }
 
   /* We find the appropriate instance of `struct sigcontext' at a
      fixed offset in the signal frame.  */
-  addr = cache->base + BIAS + 128 + 16;
+  addr = cache->base + 128 + 16;
   cache->saved_regs = sparc64nbsd_sigcontext_saved_regs (addr, next_frame);
 
   return cache;
@@ -201,13 +203,13 @@ sparc64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 
   sparc64_init_abi (info, gdbarch);
 
-  /* OpenBSD/sparc64 has SVR4-style shared libraries...  */
+  /* OpenBSD/sparc64 has SVR4-style shared libraries.  */
   set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
   set_solib_svr4_fetch_link_map_offsets
     (gdbarch, svr4_lp64_fetch_link_map_offsets);
 }
-
 \f
+
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 void _initialize_sparc64obsd_tdep (void);
 
This page took 0.031842 seconds and 4 git commands to generate.