aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2021-09-07 10:31:42 +0200
committerTom de Vries <tdevries@suse.de>2021-09-07 10:31:42 +0200
commit5d2deb81fa143e592414fd987c2899c839eb433e (patch)
tree503306aca38d6f96794559f4e8eda3d8f0fbbd02
parentb54509b84488023954f6974229b24fe6c993742b (diff)
downloadgdb-5d2deb81fa143e592414fd987c2899c839eb433e.zip
gdb-5d2deb81fa143e592414fd987c2899c839eb433e.tar.gz
gdb-5d2deb81fa143e592414fd987c2899c839eb433e.tar.bz2
[gdb/testsuite] Handle internal-error in gdb_unload
When reverting commit 5a20fadc841 and using gdb_unload instead of runto "bar" to trigger the internal-error in test-case gdb.dwarf2/locexpr-data-member-location.exp, we run into: ... ERROR: couldn't unload file in $gdb (timeout). ... and the test-case takes about 1 minute. Fix this by handling internal-error in gdb_unload, such that we have: ... ERROR: Couldn't unload file in $gdb (GDB internal error). ERROR: Could not resync from internal error (eof) ... within 2 seconds. Tested on x86_64-linux.
-rw-r--r--gdb/testsuite/lib/gdb.exp5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index d99e836..ff19760 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -235,6 +235,11 @@ proc gdb_unload {} {
exp_continue
}
-re "$gdb_prompt $" {}
+ -re "A problem internal to GDB has been detected" {
+ perror "Couldn't unload file in $GDB (GDB internal error)."
+ gdb_internal_error_resync
+ return -1
+ }
timeout {
perror "couldn't unload file in $GDB (timeout)."
return -1