* ada-lang.c (ada_convert_actual): Renames convert_actual.
[deliverable/binutils-gdb.git] / gdb / frame.c
index eda589c5d300e5a76c1f4f243184682d89142ffb..d487e8423ebf1268692f246c0c11e1b9d80338ee 100644 (file)
@@ -1,7 +1,7 @@
 /* Cache and manage frames for GDB, the GNU debugger.
 
    Copyright (C) 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000, 2001,
-   2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+   2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -369,7 +369,7 @@ frame_id_eq (struct frame_id l, struct frame_id r)
 }
 
 int
-frame_id_inner (struct frame_id l, struct frame_id r)
+frame_id_inner (struct gdbarch *gdbarch, struct frame_id l, struct frame_id r)
 {
   int inner;
   if (!l.stack_addr_p || !r.stack_addr_p)
@@ -380,7 +380,7 @@ frame_id_inner (struct frame_id l, struct frame_id r)
        comment in "frame.h", there is some fuzz here.  Frameless
        functions are not strictly inner than (same .stack but
        different .code and/or .special address).  */
-    inner = gdbarch_inner_than (current_gdbarch, l.stack_addr, r.stack_addr);
+    inner = gdbarch_inner_than (gdbarch, l.stack_addr, r.stack_addr);
   if (frame_debug)
     {
       fprintf_unfiltered (gdb_stdlog, "{ frame_id_inner (l=");
@@ -410,7 +410,7 @@ frame_find_by_id (struct frame_id id)
       if (frame_id_eq (id, this))
        /* An exact match.  */
        return frame;
-      if (frame_id_inner (id, this))
+      if (frame_id_inner (get_frame_arch (frame), id, this))
        /* Gone to far.  */
        return NULL;
       /* Either we're not yet gone far enough out along the frame
@@ -677,17 +677,6 @@ get_frame_register_unsigned (struct frame_info *frame, int regnum)
   return frame_unwind_register_unsigned (frame->next, regnum);
 }
 
-void
-frame_unwind_unsigned_register (struct frame_info *frame, int regnum,
-                               ULONGEST *val)
-{
-  gdb_byte buf[MAX_REGISTER_SIZE];
-  frame_unwind_register (frame, regnum, buf);
-  (*val) = extract_unsigned_integer (buf,
-                                    register_size (get_frame_arch (frame),
-                                                   regnum));
-}
-
 void
 put_frame_register (struct frame_info *frame, int regnum,
                    const gdb_byte *buf)
@@ -1186,7 +1175,8 @@ get_prev_frame_1 (struct frame_info *this_frame)
      go backwards) and sentinel frames (the test is meaningless).  */
   if (this_frame->next->level >= 0
       && this_frame->next->unwind->type != SIGTRAMP_FRAME
-      && frame_id_inner (this_id, get_frame_id (this_frame->next)))
+      && frame_id_inner (get_frame_arch (this_frame), this_id,
+                        get_frame_id (this_frame->next)))
     {
       if (frame_debug)
        {
@@ -1730,12 +1720,8 @@ frame_sp_unwind (struct frame_info *next_frame)
   /* Now things are really are grim.  Hope that the value returned by
      the gdbarch_sp_regnum register is meaningful.  */
   if (gdbarch_sp_regnum (gdbarch) >= 0)
-    {
-      ULONGEST sp;
-      frame_unwind_unsigned_register (next_frame,
-                                     gdbarch_sp_regnum (gdbarch), &sp);
-      return sp;
-    }
+    return frame_unwind_register_unsigned (next_frame,
+                                          gdbarch_sp_regnum (gdbarch));
   internal_error (__FILE__, __LINE__, _("Missing unwind SP method"));
 }
 
This page took 0.024032 seconds and 4 git commands to generate.