[binutils-gdb] gdb, testsuite: fix gdb.base/save-history.exp for native-extended-gdbserver
Tankut Baris Aktemur via Gdb-cvs <[email protected]>
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8a5e138e6276ce7644ab858751440cb59f35623b commit 8a5e138e6276ce7644ab858751440cb59f35623b Author: Tankut Baris Aktemur <[email protected]> Date: Wed Apr 29 09:33:56 2026 +0200 gdb, testsuite: fix gdb.base/save-history.exp for native-extended-gdbserver When executed with the native-extended-gdbserver board file, we get FAIL: gdb.base/save-history.exp: check history contents This is because the history file contains an extra line for the command 'target extended-remote ...'. Address this in the test. Approved-By: Tom Tromey <[email protected]> Diff: --- gdb/testsuite/gdb.base/save-history.exp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gdb/testsuite/gdb.base/save-history.exp b/gdb/testsuite/gdb.base/save-history.exp index a24b0b9454c..4b8eafa9ffa 100644 --- a/gdb/testsuite/gdb.base/save-history.exp +++ b/gdb/testsuite/gdb.base/save-history.exp @@ -30,6 +30,13 @@ gdb_test_no_output "save history $filename" \ set expected "set height 0\n" append expected "set width 0\n" + +# There is an additional target connection command with the +# extended-remote board file. +if {[target_info gdb_protocol] == "extended-remote"} { + append expected "target extended-remote $gdbserver_gdbport\n" +} + append expected "print 23\n" append expected "save history $filename\n"