2007-06-18 Markus Deuling <deuling@de.ibm.com>
[deliverable/binutils-gdb.git] / gdb / ppcobsd-tdep.c
index 89642b55cf59ded3dc54392f17de59f9200c36db..3e82c6f0b1947254619cc8229df5e6b8e5cad4d1 100644 (file)
@@ -21,9 +21,9 @@
 
 #include "defs.h"
 #include "arch-utils.h"
-#include "floatformat.h"
 #include "frame.h"
 #include "frame-unwind.h"
+#include "gdbtypes.h"
 #include "osabi.h"
 #include "regcache.h"
 #include "regset.h"
@@ -211,7 +211,8 @@ ppcobsd_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache)
   insn = extract_unsigned_integer (buf, PPC_INSN_SIZE);
   sigcontext_offset = (0x10000 - (insn & 0x0000ffff)) + 8;
 
-  base = frame_unwind_register_unsigned (next_frame, SP_REGNUM);
+  base = frame_unwind_register_unsigned (next_frame,
+                                        gdbarch_sp_regnum (current_gdbarch));
   addr = base + sigcontext_offset + 2 * tdep->wordsize;
   for (i = 0; i < ppc_num_gprs; i++, addr += tdep->wordsize)
     {
@@ -226,7 +227,8 @@ ppcobsd_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache)
   addr += tdep->wordsize;
   trad_frame_set_reg_addr (cache, tdep->ppc_ctr_regnum, addr);
   addr += tdep->wordsize;
-  trad_frame_set_reg_addr (cache, PC_REGNUM, addr); /* SRR0? */
+  trad_frame_set_reg_addr (cache, gdbarch_pc_regnum (current_gdbarch), addr);
+  /* SRR0? */
   addr += tdep->wordsize;
 
   /* Construct the frame ID using the function start.  */
@@ -280,7 +282,7 @@ ppcobsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
   /* OpenBSD doesn't support the 128-bit `long double' from the psABI.  */
   set_gdbarch_long_double_bit (gdbarch, 64);
-  set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_big);
+  set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
 
   /* OpenBSD currently uses a broken GCC.  */
   set_gdbarch_return_value (gdbarch, ppc_sysv_abi_broken_return_value);
This page took 0.024771 seconds and 4 git commands to generate.