gdb/testsuite: Add compiler options parameter to function_range helper
[deliverable/binutils-gdb.git] / gdb / frame.c
index c746a6a231ed8abc7a12856cbbdf8690e060b3a8..d74d1d5c7c5d57c1e455ad379415873fe25447c0 100644 (file)
@@ -2508,14 +2508,15 @@ find_frame_sal (frame_info *frame)
   int notcurrent;
   CORE_ADDR pc;
 
-  /* If the next frame represents an inlined function call, this frame's
-     sal is the "call site" of that inlined function, which can not
-     be inferred from get_frame_pc.  */
-  next_frame = get_next_frame (frame);
   if (frame_inlined_callees (frame) > 0)
     {
       struct symbol *sym;
 
+      /* If the current frame has some inlined callees, and we have a next
+        frame, then that frame must be an inlined frame.  In this case
+        this frame's sal is the "call site" of the next frame's inlined
+        function, which can not be inferred from get_frame_pc.  */
+      next_frame = get_next_frame (frame);
       if (next_frame)
        sym = get_frame_function (next_frame);
       else
@@ -2958,8 +2959,9 @@ the rest of the stack trace."),
   },
 };
 
+void _initialize_frame ();
 void
-_initialize_frame (void)
+_initialize_frame ()
 {
   obstack_init (&frame_cache_obstack);
 
This page took 0.027082 seconds and 4 git commands to generate.