diff options
author | Tom de Vries <tdevries@suse.de> | 2024-07-29 15:42:28 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2024-07-29 15:42:28 +0200 |
commit | 5dd825c15dcdf0278a37c7d8581019a4ace56c8f (patch) | |
tree | d11097cb5e3edfea02b771cf5211528fec8d219c /gdb | |
parent | 312aea764b7b8ad621da601f4a88c859ccbcf12a (diff) | |
download | binutils-5dd825c15dcdf0278a37c7d8581019a4ace56c8f.zip binutils-5dd825c15dcdf0278a37c7d8581019a4ace56c8f.tar.gz binutils-5dd825c15dcdf0278a37c7d8581019a4ace56c8f.tar.bz2 |
[gdb/testsuite] Fix gdb.gdb/index-file.exp with -g0
When building gdb with -g0 and running test-case gdb.gdb/index-file.exp, we
run into:
...
(gdb) save gdb-index index_1^M
Error while writing index for `xgdb': No debugging symbols^M
(gdb) FAIL: gdb.gdb/index-file.exp: create gdb-index file
...
Fix this by instead emitting an unsupported, and bailing out.
Tested on aarch64-linux.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/gdb.gdb/index-file.exp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.gdb/index-file.exp b/gdb/testsuite/gdb.gdb/index-file.exp index 069c7cc..c30f417 100644 --- a/gdb/testsuite/gdb.gdb/index-file.exp +++ b/gdb/testsuite/gdb.gdb/index-file.exp @@ -47,8 +47,19 @@ if { $worker_threads eq "UNKNOWN" } { set dir1 [standard_output_file "index_1"] remote_exec host "mkdir -p ${dir1}" with_timeout_factor $timeout_factor { - gdb_test_no_output "save gdb-index $dir1" \ - "create gdb-index file" + set ok 0 + gdb_test_multiple "save gdb-index $dir1" "create gdb-index file" { + -re -wrap "Error while writing index for \[^\r\n\]*: No debugging symbols" { + unsupported $gdb_test_name + } + -re -wrap "^" { + pass $gdb_test_name + set ok 1 + } + } + if { ! $ok } { + return -1 + } gdb_test_no_output "save gdb-index -dwarf-5 $dir1" \ "create dwarf-index files" |