2012-04-20 Sergio Durigan Junior <sergiodj@redhat.com>
[deliverable/binutils-gdb.git] / gdb / inline-frame.c
index 5408e88002edc7441bb5fce8e877224e4920bd53..06de5b0e793f87816383e19ee1cdef03008672e7 100644 (file)
@@ -1,6 +1,6 @@
 /* Inline frame unwinder for GDB.
 
-   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2008-2012 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,6 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
+#include "inline-frame.h"
 #include "addrmap.h"
 #include "block.h"
 #include "frame-unwind.h"
@@ -75,6 +76,7 @@ find_inline_frame_state (ptid_t ptid)
        {
          struct regcache *regcache = get_thread_regcache (ptid);
          CORE_ADDR current_pc = regcache_read_pc (regcache);
+
          if (current_pc != state->saved_pc)
            {
              /* PC has changed - this context is invalid.  Use the
@@ -124,7 +126,10 @@ clear_inline_frame_state (ptid_t ptid)
     {
       VEC (inline_state_s) *new_states = NULL;
       int pid = ptid_get_pid (ptid);
-      for (ix = 0; VEC_iterate (inline_state_s, inline_states, ix, state); ix++)
+
+      for (ix = 0;
+          VEC_iterate (inline_state_s, inline_states, ix, state);
+          ix++)
        if (pid != ptid_get_pid (state->ptid))
          VEC_safe_push (inline_state_s, new_states, state);
       VEC_free (inline_state_s, inline_states);
@@ -254,16 +259,15 @@ inline_frame_sniffer (const struct frame_unwind *self,
   return 1;
 }
 
-const struct frame_unwind inline_frame_unwinder = {
+const struct frame_unwind inline_frame_unwind = {
   INLINE_FRAME,
+  default_frame_unwind_stop_reason,
   inline_frame_this_id,
   inline_frame_prev_register,
   NULL,
   inline_frame_sniffer
 };
 
-const struct frame_unwind *const inline_frame_unwind = &inline_frame_unwinder;
-
 /* Return non-zero if BLOCK, an inlined function block containing PC,
    has a group of contiguous instructions starting at PC (but not
    before it).  */
@@ -285,7 +289,7 @@ block_starting_point_at (CORE_ADDR pc, struct block *block)
   if (new_block == block || contained_in (new_block, block))
     return 0;
 
-  /* The immediately preceeding address belongs to a different block,
+  /* The immediately preceding address belongs to a different block,
      which is not a child of this one.  Treat this as an entrance into
      BLOCK.  */
   return 1;
This page took 0.026067 seconds and 4 git commands to generate.