From: Tom Tromey Date: Wed, 13 Nov 2019 01:20:58 +0000 (-0700) Subject: Display "main" on initial TUI startup X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77b97e006217ed089b588e6799a59334bd216c43;p=binutils-gdb.git Display "main" on initial TUI startup 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 * tui/tui.c (tui_enable): Call tui_display_main. gdb/testsuite/ChangeLog 2019-12-20 Tom Tromey * gdb.tui/list.exp: Check for source on initial listing. Change-Id: Ic7bfc930e1179f5b61111e30a2dae46a98b00064 --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e4715362c06..1034aa85fe2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-12-20 Tom Tromey + + * tui/tui.c (tui_enable): Call tui_display_main. + 2019-12-20 Tom Tromey * tui/tui-disasm.c (tui_get_begin_asm_address): Use diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4f8d8517e3c..f25787c0866 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-12-20 Tom Tromey + + * gdb.tui/list.exp: Check for source on initial listing. + 2019-12-11 Tom Tromey * gdb.xml/tdesc-arch.exp (set_arch): Add "trans_mode" parameter. diff --git a/gdb/testsuite/gdb.tui/list.exp b/gdb/testsuite/gdb.tui/list.exp index 6efe1939c91..08153c695d7 100644 --- a/gdb/testsuite/gdb.tui/list.exp +++ b/gdb/testsuite/gdb.tui/list.exp @@ -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
" diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index a0d2e4c7913..dbc890a9ade 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -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);