* stack.c (print_frame_info_base): Always set current_source_symtab
authorKeith Seitz <keiths@redhat.com>
Thu, 29 Aug 2002 19:59:35 +0000 (19:59 +0000)
committerKeith Seitz <keiths@redhat.com>
Thu, 29 Aug 2002 19:59:35 +0000 (19:59 +0000)
        and current_source_line.

gdb/ChangeLog
gdb/stack.c

index 369aa13167edb7c53eb73f721865759c996589c9..7515c7f7a339c05f6e03a801663ec982f62a5625 100644 (file)
@@ -1,3 +1,8 @@
+2002-08-29  Keith Seitz  <keiths@redhat.com>
+
+       * stack.c (print_frame_info_base): Always set current_source_symtab
+       and current_source_line.
+
 2002-08-29  Donn Terry  <donnte@microsoft.com>
 
        * proc-api.c (rw_table): Fix typo in #ifdef PCSHOLD (missing S).
index 23ca3df9873f097c8cd72a34897a58043a2be390..30ebc09dee70fba8ece1ae60770626d2f8e2d7f7 100644 (file)
@@ -398,6 +398,11 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
     print_frame (fi, level, source, args, sal);
 
   source_print = (source == SRC_LINE || source == SRC_AND_LOC);
+  if (sal.symtab)
+    {
+      current_source_symtab = sal.symtab;
+      current_source_line = sal.line;
+    }
 
   if (source_print && sal.symtab)
     {
@@ -410,10 +415,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
       if (!done)
        {
          if (print_frame_info_listing_hook)
-           {
-             print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0);
-             current_source_symtab = sal.symtab;
-           }
+           print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0);
          else
            {
              /* We used to do this earlier, but that is clearly