Display "main" on initial TUI startup
authorTom Tromey <tom@tromey.com>
Wed, 13 Nov 2019 01:20:58 +0000 (18:20 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 20 Dec 2019 16:15:55 +0000 (09:15 -0700)
I noticed that even when there's a symbol file, "tui enable" won't
show "main" by default.  I think it should, and this patch fixes this.

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

* tui/tui.c (tui_enable): Call tui_display_main.

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

* gdb.tui/list.exp: Check for source on initial listing.

Change-Id: Ic7bfc930e1179f5b61111e30a2dae46a98b00064

gdb/ChangeLog
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.tui/list.exp
gdb/tui/tui.c

index e4715362c061b5e6ba07e3f7795e3b3aab61cd9f..1034aa85fe2e9cd676f5d0f0d2e8dfae578e93f7 100644 (file)
@@ -1,3 +1,7 @@
+2019-12-20  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui.c (tui_enable): Call tui_display_main.
+
 2019-12-20  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-disasm.c (tui_get_begin_asm_address): Use
index 4f8d8517e3c0b1bc59bbfc1192f94ef2ce32667c..f25787c08665214768f893ae0d74ad06bcc78a72 100644 (file)
@@ -1,3 +1,7 @@
+2019-12-20  Tom Tromey  <tom@tromey.com>
+
+       * gdb.tui/list.exp: Check for source on initial listing.
+
 2019-12-11  Tom Tromey  <tromey@adacore.com>
 
        * gdb.xml/tdesc-arch.exp (set_arch): Add "trans_mode" parameter.
index 6efe1939c91356480e4a5f958388bd36f58656bf..08153c695d7d2dadaa62818fb4275ab74705ca71 100644 (file)
@@ -28,7 +28,7 @@ if {![Term::enter_tui]} {
     unsupported "TUI not supported"
 }
 
-Term::check_contents "initial source listing" "No Source Available"
+Term::check_contents "initial source listing" "21 *return 0"
 
 Term::command "layout asm"
 Term::check_contents "asm window shows main" "$hex <main>"
index a0d2e4c791329f4fc875091e59297a3b7ca3d167..dbc890a9ade1ed5eacb181811e77248e9ca53d44 100644 (file)
@@ -513,6 +513,8 @@ tui_enable (void)
 
   if (deprecated_safe_get_selected_frame ())
     tui_show_frame_info (deprecated_safe_get_selected_frame ());
+  else
+    tui_display_main ();
 
   /* Restore TUI keymap.  */
   tui_set_key_mode (tui_current_key_mode);
This page took 0.038526 seconds and 4 git commands to generate.