Remove tui_source_window::show_symtab_source
authorTom Tromey <tom@tromey.com>
Wed, 13 Nov 2019 00:23:18 +0000 (17:23 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 20 Dec 2019 16:15:51 +0000 (09:15 -0700)
tui_source_window::show_symtab_source is identical to
update_source_window, so remove the former.

gdb/ChangeLog
2019-12-20  Tom Tromey  <tom@tromey.com>

* tui/tui-winsource.c (tui_update_source_windows_with_addr)
(tui_update_source_windows_with_line): Call update_source_window.
* tui/tui-source.h (struct tui_source_window)
<show_symtab_source>: Don't declare.
* tui/tui-source.c (tui_source_window::show_symtab_source):
Remove.

Change-Id: I41781df2126e8bafad46d058532d52602a288e06

gdb/ChangeLog
gdb/tui/tui-source.c
gdb/tui/tui-source.h
gdb/tui/tui-winsource.c

index 15e88940152f8d47158fcd2e8e7f63eb956346d9..5125089b6f9d3aee86041f1e6e1b4164fa728837 100644 (file)
@@ -1,3 +1,12 @@
+2019-12-20  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-winsource.c (tui_update_source_windows_with_addr)
+       (tui_update_source_windows_with_line): Call update_source_window.
+       * tui/tui-source.h (struct tui_source_window)
+       <show_symtab_source>: Don't declare.
+       * tui/tui-source.c (tui_source_window::show_symtab_source):
+       Remove.
+
 2019-12-20  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-winsource.c (tui_update_source_windows_with_addr): Call
index a4d808faada9db3fefc61e052ce88b530ea2d8b6..062f26f55ebc7ad647bf3cd79e6f20a8e30389fe 100644 (file)
@@ -125,18 +125,6 @@ tui_source_window::set_contents (struct gdbarch *arch,
 }
 
 
-/* Function to display source in the source window.  This function
-   initializes the horizontal scroll to 0.  */
-void
-tui_source_window::show_symtab_source (struct gdbarch *gdbarch,
-                                      struct symtab *s,
-                                      struct tui_line_or_address line)
-{
-  horizontal_offset = 0;
-  update_source_window_as_is (gdbarch, s, line);
-}
-
-
 /* Answer whether the source is currently displayed in the source
    window.  */
 bool
index 15d14291d2a7a493b6b37eaf0e741d77d840aa2e..a573ce47f4ff556501bbf78a679ee971bcf4f66f 100644 (file)
@@ -56,9 +56,6 @@ struct tui_source_window : public tui_source_window_base
     do_erase_source_content (_("[ No Source Available ]"));
   }
 
-  void show_symtab_source (struct gdbarch *, struct symtab *,
-                          struct tui_line_or_address);
-
 protected:
 
   void do_scroll_vertical (int num_to_scroll) override;
index b1499368f83481ee205bd161c764cb2d2deb1c20..9274678aa9f2e8b44881341d9e02f4ab4157118c 100644 (file)
@@ -227,7 +227,7 @@ tui_update_source_windows_with_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
        {
          l.loa = LOA_LINE;
          l.u.line_no = sal.line;
-         TUI_SRC_WIN->show_symtab_source (gdbarch, sal.symtab, l);
+         TUI_SRC_WIN->update_source_window (gdbarch, sal.symtab, l);
        }
     }
   else
@@ -261,7 +261,7 @@ tui_update_source_windows_with_line (struct symtab *s, int line)
     default:
       l.loa = LOA_LINE;
       l.u.line_no = line;
-      TUI_SRC_WIN->show_symtab_source (gdbarch, s, l);
+      TUI_SRC_WIN->update_source_window (gdbarch, s, l);
       if (tui_current_layout () == SRC_DISASSEM_COMMAND)
        {
          find_line_pc (s, line, &pc);
This page took 0.031397 seconds and 4 git commands to generate.