* frame.h (set_current_sal_from_frame): New prototype.
authorDaniel Jacobowitz <drow@false.org>
Thu, 30 Mar 2006 16:37:13 +0000 (16:37 +0000)
committerDaniel Jacobowitz <drow@false.org>
Thu, 30 Mar 2006 16:37:13 +0000 (16:37 +0000)
* stack.c (set_current_sal_from_frame): Make global.
* infrun.c (normal_stop): Call set_current_sal_from_frame.

gdb/ChangeLog
gdb/frame.h
gdb/infrun.c
gdb/stack.c

index b61365fa3cbd7a8d0470909a9d0a1775524e2fe8..87c7974a219161ef51da9b1f43443faa06dc24b0 100644 (file)
@@ -1,3 +1,9 @@
+2006-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
+       * frame.h (set_current_sal_from_frame): New prototype.
+       * stack.c (set_current_sal_from_frame): Make global.
+       * infrun.c (normal_stop): Call set_current_sal_from_frame.
+
 2006-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * linux-thread-db.c: Include "linux-nat.h".
index a73a4f1dec3550f5bfd1168a4e3748ea0164e0af..800cbfbcf18f2cd82c96dab05bcec53522a43ea4 100644 (file)
@@ -300,6 +300,12 @@ extern CORE_ADDR get_frame_func (struct frame_info *fi);
 extern void find_frame_sal (struct frame_info *frame,
                            struct symtab_and_line *sal);
 
+/* Set the current source and line to the location given by frame
+   FRAME, if possible.  When CENTER is true, adjust so the relevant
+   line is in the center of the next 'list'.  */
+
+void set_current_sal_from_frame (struct frame_info *, int);
+
 /* Return the frame base (what ever that is) (DEPRECATED).
 
    Old code was trying to use this single method for two conflicting
index 47fbe09ed7294dab55b26c57d58c95613054d001..bccca0d7dc901a8cc2e99999087b59d391c423c5 100644 (file)
@@ -3044,6 +3044,12 @@ Further execution is probably impossible.\n"));
 
   target_terminal_ours ();
 
+  /* Set the current source location.  This will also happen if we
+     display the frame below, but the current SAL will be incorrect
+     during a user hook-stop function.  */
+  if (target_has_stack && !stop_stack_dummy)
+    set_current_sal_from_frame (get_current_frame (), 1);
+
   /* Look up the hook_stop and run it (CLI internally handles problem
      of stop_command's pre-hook not existing).  */
   if (stop_command)
index 435bb0c9e7a8ec909e943d37552dd2f8865f0407..d0bbc87b1cbecd5f58d38340b7d23206b969eb20 100644 (file)
@@ -61,8 +61,6 @@ static void print_frame (struct frame_info *frame, int print_level,
                         enum print_what print_what,  int print_args,
                         struct symtab_and_line sal);
 
-static void set_current_sal_from_frame (struct frame_info *, int);
-
 /* Zero means do things normally; we are interacting directly with the
    user.  One means print the full filename and linenumber when a
    frame is printed, and do so in a format emacs18/emacs19.22 can
@@ -373,7 +371,7 @@ print_args_stub (void *args)
    FRAME, if possible.  When CENTER is true, adjust so the relevant
    line is in the center of the next 'list'.  */
 
-static void
+void
 set_current_sal_from_frame (struct frame_info *frame, int center)
 {
   struct symtab_and_line sal;
This page took 0.050481 seconds and 4 git commands to generate.