aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2023-09-08 10:45:08 +0100
committerAndrew Burgess <aburgess@redhat.com>2023-09-08 11:01:50 +0100
commit932a49fff332ba4921dc9e38cf45bf65a301f2c6 (patch)
treeffa14e71b15db7910e9f3e30a6c2e66b79b5ed61 /gdb
parent1adecddd190f8eca8ea153dec2b003985bcc744d (diff)
downloadgdb-932a49fff332ba4921dc9e38cf45bf65a301f2c6.zip
gdb-932a49fff332ba4921dc9e38cf45bf65a301f2c6.tar.gz
gdb-932a49fff332ba4921dc9e38cf45bf65a301f2c6.tar.bz2
gdb/testsuite: fix gdb.mi/mi-condbreak-throw.exp failure
In commit: commit 3ce8f906be7a55d8c0375e6d360cc53b456d86ae Date: Tue Aug 8 10:45:20 2023 +0100 gdb: MI stopped events when unwindonsignal is on a new test, gdb.mi/mi-condbreak-throw.exp, was added. Unfortunately, this test would fail when using the native-gdbserver board (and other similar boards). The problem was that one of the expected output patterns included some output from the inferior. When using the native-gdbserver board, this output is not printed to GDB's tty, but is instead printed to gdbserver's tty, the result is that the expected output no longer matches, and the test fails. Additionally, as the output is actually from the C++ runtime, rather than the test's source file, changes to the C++ runtime could cause the output to change. To solve both of these issues, in this commit, I'm removing the reference to the inferior's output, and replacing it with '.*', which will skip the output if it is present, but is equally happy if the output is not present. After this commit gdb.mi/mi-condbreak-throw.exp now passes on all boards, including native-gdbserver.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.mi/mi-condbreak-throw.exp3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-condbreak-throw.exp b/gdb/testsuite/gdb.mi/mi-condbreak-throw.exp
index 4151fa1..7f29124 100644
--- a/gdb/testsuite/gdb.mi/mi-condbreak-throw.exp
+++ b/gdb/testsuite/gdb.mi/mi-condbreak-throw.exp
@@ -97,8 +97,7 @@ proc run_test { unwind_on_exception } {
mi_gdb_test "" \
[multi_line \
- "terminate called after throwing an instance of 'int'" \
- "~\"\\\\nProgram\"" \
+ ".*~\"\\\\nProgram\"" \
"~\" received signal SIGABRT, Aborted\\.\\\\n\"${out_ln_re}" \
"\\*stopped,reason=\"signal-received\",signal-name=\"SIGABRT\"\[^\r\n\]+frame=\\{addr=\"$::hex\",\[^\r\n\]+\\}\[^\r\n\]+" \
"&\"Error in testing condition for breakpoint $bpnum:\\\\n\"" \