summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.tui
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-12-21 11:14:56 -0700
committerTom Tromey <tom@tromey.com>2020-01-19 13:08:48 -0700
commit4f13c1c00be32131845ae50aef788d4f2c652dff (patch)
tree2d269ef25cb784be2931a85b69a01bfd3bbc2e75 /gdb/testsuite/gdb.tui
parentfa47e4463ab4ee4ddc7858ab11063c7965b232ac (diff)
downloadbinutils-gdb-4f13c1c00be32131845ae50aef788d4f2c652dff.tar.gz
Make "file" clear TUI source window
I noticed that a plain "file" will leave the current source file in the TUI source window. Instead, I think, it should clear the source window. This patch implements this. gdb/ChangeLog 2020-01-19 Tom Tromey <tom@tromey.com> * tui/tui-winsource.c (tui_update_source_windows_with_line): Handle case where symtab is null. gdb/testsuite/ChangeLog 2020-01-19 Tom Tromey <tom@tromey.com> * gdb.tui/main.exp: Add check for plain "file". Change-Id: I8424acf837f1a47f75bc6a833d1e917d4c10b51e
Diffstat (limited to 'gdb/testsuite/gdb.tui')
-rw-r--r--gdb/testsuite/gdb.tui/main.exp7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.tui/main.exp b/gdb/testsuite/gdb.tui/main.exp
index 26ca0046fcc..ae2393e6e98 100644
--- a/gdb/testsuite/gdb.tui/main.exp
+++ b/gdb/testsuite/gdb.tui/main.exp
@@ -26,9 +26,16 @@ if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} {
# Note: don't pass the executable here
Term::clean_restart 24 80
+# Later on we'd like to avoid having to answer a question.
+gdb_test_no_output "set interactive-mode off"
+
if {![Term::enter_tui]} {
unsupported "TUI not supported"
}
Term::command "file [standard_output_file $testfile]"
Term::check_contents "show main after file" "\\|.*21 *return 0"
+
+# Ensure that "file" clears the source window.
+Term::command "file"
+Term::check_contents "file clears window" "No Source Available"