2009-01-08 Kai Tietz <kai.tietz@onevision.com>
[binutils-gdb.git] / gdb / i386-nto-tdep.c
index 61afa06658ab117b24f8f03705904eae5792a01b..ede9bf13f10445804b227222f72ef11cb4fe75a2 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for QNX Neutrino x86.
 
-   Copyright (C) 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    Contributed by QNX Software Systems Ltd.
 
@@ -131,7 +131,8 @@ i386nto_regset_id (int regno)
 }
 
 static int
-i386nto_register_area (int regno, int regset, unsigned *off)
+i386nto_register_area (struct gdbarch *gdbarch,
+                      int regno, int regset, unsigned *off)
 {
   int len;
 
@@ -166,8 +167,7 @@ i386nto_register_area (int regno, int regset, unsigned *off)
       if (regno == -1)
        return regset_size;
 
-      *off = (regno - gdbarch_fp0_regnum (current_gdbarch))
-            * regsize + off_adjust;
+      *off = (regno - gdbarch_fp0_regnum (gdbarch)) * regsize + off_adjust;
       return 10;
       /* Why 10 instead of regsize?  GDB only stores 10 bytes per FP
          register so if we're sending a register back to the target,
@@ -204,13 +204,13 @@ i386nto_regset_fill (const struct regcache *regcache, int regset, char *data)
   return 0;
 }
 
-/* Return whether the frame preceding NEXT_FRAME corresponds to a QNX
-   Neutrino sigtramp routine.  */
+/* Return whether THIS_FRAME corresponds to a QNX Neutrino sigtramp
+   routine.  */
 
 static int
-i386nto_sigtramp_p (struct frame_info *next_frame)
+i386nto_sigtramp_p (struct frame_info *this_frame)
 {
-  CORE_ADDR pc = frame_pc_unwind (next_frame);
+  CORE_ADDR pc = get_frame_pc (this_frame);
   char *name;
 
   find_pc_partial_function (pc, &name, NULL, NULL);
@@ -219,16 +219,16 @@ i386nto_sigtramp_p (struct frame_info *next_frame)
 
 #define I386_NTO_SIGCONTEXT_OFFSET 136
 
-/* Assuming NEXT_FRAME is a frame following a QNX Neutrino sigtramp
-   routine, return the address of the associated sigcontext structure.  */
+/* Assuming THIS_FRAME is a QNX Neutrino sigtramp routine, return the
+   address of the associated sigcontext structure.  */
 
 static CORE_ADDR
-i386nto_sigcontext_addr (struct frame_info *next_frame)
+i386nto_sigcontext_addr (struct frame_info *this_frame)
 {
   char buf[4];
   CORE_ADDR sp;
 
-  frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
+  get_frame_register (this_frame, I386_ESP_REGNUM, buf);
   sp = extract_unsigned_integer (buf, 4);
 
   return sp + I386_NTO_SIGCONTEXT_OFFSET;