diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-01-13 20:08:41 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-01-17 11:22:22 -0500 |
commit | 4e2a80ba606fdb48018d06b510ff7873a10e43ae (patch) | |
tree | 5a79da407aad476c305665533b9e742f52118e64 /gdb/testsuite | |
parent | ac37b79cc440e37fc704d425a6e450afb3c7ee89 (diff) | |
download | fsf-binutils-gdb-4e2a80ba606fdb48018d06b510ff7873a10e43ae.zip fsf-binutils-gdb-4e2a80ba606fdb48018d06b510ff7873a10e43ae.tar.gz fsf-binutils-gdb-4e2a80ba606fdb48018d06b510ff7873a10e43ae.tar.bz2 |
gdb/testsuite: expect SIGSEGV from top GDB spawn id
When testing with the native-extended-gdbserver, I get:
Thread 1 "xgdb" received signal SIGSEGV, Segmentation fault.
0x00007ffff6d828f2 in GC_find_limit_with_bound () from /usr/lib/x86_64-linux-gnu/libgc.so.1
(gdb) FAIL: gdb.gdb/selftest.exp: xgdb is at prompt
This is because the -re that is supposed to match this SIGSEGV is after
`-i $inferior_spawn_id`. On native, the top and bottom GDB are on the
same spawn id, so it ends up working. But with a gdbserver board,
that's not the case. Move the SIGSEGV -re before the `-i
$inferior_spawn_id` line, such that it matches what the top GDB outputs.
Do the same fix in gdb.gdb/python-helper.exp.
Change-Id: I3291630e218a5a3a6a47805b999ddbc9b968c927
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.gdb/python-helper.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.gdb/selftest.exp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp index c147c6b..98f03ef 100644 --- a/gdb/testsuite/gdb.gdb/python-helper.exp +++ b/gdb/testsuite/gdb.gdb/python-helper.exp @@ -86,13 +86,13 @@ proc test_python_helper {} { # stop is being detected from the inner GDB, hence the use of -i # here. gdb_test_multiple "continue" "start inner gdb" { - -i "$inferior_spawn_id" -re "received signal SIGSEGV.* in GC_.*$outer_prompt_re" { # Some versions of the GC used by Guile cause a SEGV # during stack probing. Ignore this and carry on. send_gdb "continue\n" exp_continue } + -i "$inferior_spawn_id" -re "\r\n$gdb_prompt $" { pass $gdb_test_name } diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp index 177c29f..df12602 100644 --- a/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp @@ -74,13 +74,13 @@ proc test_with_self { } { "$gdb_prompt $"] set test "xgdb is at prompt" gdb_test_multiple "continue" $test { - -i "$inferior_spawn_id" -re "received signal SIGSEGV.* in GC_.*$gdb_prompt" { # Some versions of the GC used by Guile cause a SEGV # during stack probing. Ignore this and carry on. send_gdb "continue\n" exp_continue } + -i "$inferior_spawn_id" -re "$banner" { pass $test } |