Add quotes to avoid a null test expression.
[deliverable/binutils-gdb.git] / gdb / sparc64obsd-tdep.c
index c26ce3a235d67e1c9e07e3c66bcfdb2695c223a4..2d6a61717a71c28dfa6aadbee679297953ac4da6 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.
 
 #include "osabi.h"
 #include "regset.h"
 #include "symtab.h"
+#include "objfiles.h"
 #include "solib-svr4.h"
 #include "trad-frame.h"
 
 #include "gdb_assert.h"
 
 #include "sparc64-tdep.h"
-#include "nbsd-tdep.h"
 
 /* OpenBSD uses the traditional NetBSD core file format, even for
    ports that use ELF.  The core files don't use multiple register
@@ -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;
@@ -159,13 +161,13 @@ sparc64obsd_frame_prev_register (struct frame_info *next_frame,
                                 void **this_cache,
                                 int regnum, int *optimizedp,
                                 enum lval_type *lvalp, CORE_ADDR *addrp,
-                                int *realnump, void *valuep)
+                                int *realnump, gdb_byte *valuep)
 {
   struct sparc_frame_cache *cache =
     sparc64obsd_frame_cache (next_frame, this_cache);
 
-  trad_frame_prev_register (next_frame, cache->saved_regs, regnum,
-                           optimizedp, lvalp, addrp, realnump, valuep);
+  trad_frame_get_prev_register (next_frame, cache->saved_regs, regnum,
+                               optimizedp, lvalp, addrp, realnump, valuep);
 }
 
 static const struct frame_unwind sparc64obsd_frame_unwind =
@@ -201,11 +203,13 @@ sparc64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 
   sparc64_init_abi (info, gdbarch);
 
+  /* 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, nbsd_lp64_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.025972 seconds and 4 git commands to generate.