diff options
author | Tom de Vries <tdevries@suse.de> | 2022-05-11 11:14:18 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-05-11 11:14:18 +0200 |
commit | 4d88ae0c7b58ca3fc8125c0f573264de21647886 (patch) | |
tree | 1c9297b2d96104e208aabf916b5ab2b4c083b665 | |
parent | 37b506d30a8e82df69b807f57ba09a2369265ea0 (diff) | |
download | gdb-4d88ae0c7b58ca3fc8125c0f573264de21647886.zip gdb-4d88ae0c7b58ca3fc8125c0f573264de21647886.tar.gz gdb-4d88ae0c7b58ca3fc8125c0f573264de21647886.tar.bz2 |
[gdb/testsuite] Fix gdb.base/maint.exp on powerpc64le
On powerpc64le-linux, I ran into:
...
FAIL: gdb.base/maint.exp: maint print objfiles: symtabs
...
The problem is that:
- the "Cooked index in use" line occurs twice in the gdb output:
- once for exec maint, and
- once for "Object file system-supplied DSO".
- the matching of the second "Cooked index in use" also consumes
the "Symtabs:" string, and consequently the corresponding
clause does not trigger and $symtabs remains 0.
Fix this by limiting the output of the command to the exec.
Tested on x86_64-linux and powerpcle-linux.
-rw-r--r-- | gdb/testsuite/gdb.base/maint.exp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index 45ccdc6..2817c6e 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -226,7 +226,9 @@ set header 0 set psymtabs 0 set cooked_index 0 set symtabs 0 -gdb_test_multiple "maint print objfiles" "" -lbl { +set cmd "maint print objfiles" +set re "maint" +gdb_test_multiple "$cmd $re" "$cmd" -lbl { -re "\r\nObject file.*maint($EXEEXT)?: Objfile at ${hex}" { set header 1 exp_continue |