diff options
author | Tom de Vries <tdevries@suse.de> | 2021-06-10 07:36:19 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-06-10 07:36:19 +0200 |
commit | 0cc809fa0f947227bfa156df576a6943f5bbbdfe (patch) | |
tree | 0222e8d2bcdc4a0cf4d8c1da8d20d24178290385 | |
parent | c572c4580e774f1ec0115948d31dcf8a5b04878e (diff) | |
download | fsf-binutils-gdb-0cc809fa0f947227bfa156df576a6943f5bbbdfe.zip fsf-binutils-gdb-0cc809fa0f947227bfa156df576a6943f5bbbdfe.tar.gz fsf-binutils-gdb-0cc809fa0f947227bfa156df576a6943f5bbbdfe.tar.bz2 |
[gdb/testsuite] Fix gdb.cp/cplusfuncs.exp with check-read1
When running check-read1, we run into:
...
FAIL: gdb.cp/cplusfuncs.exp: info function for "operator=(" (timeout)
...
Fix this by using using gdb_test_lines in info_func_regexp.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2021-06-10 Tom de Vries <tdevries@suse.de>
* gdb.cp/cplusfuncs.exp (info_func_regexp): Use gdb_test_lines.
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/cplusfuncs.exp | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 39aa648..5e74a6a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2021-06-10 Tom de Vries <tdevries@suse.de> + + * gdb.cp/cplusfuncs.exp (info_func_regexp): Use gdb_test_lines. + 2021-06-09 Tom Tromey <tromey@adacore.com> * README (Example): Update read1 example. diff --git a/gdb/testsuite/gdb.cp/cplusfuncs.exp b/gdb/testsuite/gdb.cp/cplusfuncs.exp index f1c2ff4..19be8ab 100644 --- a/gdb/testsuite/gdb.cp/cplusfuncs.exp +++ b/gdb/testsuite/gdb.cp/cplusfuncs.exp @@ -287,13 +287,16 @@ proc probe_demangler { } { # proc info_func_regexp { name demangled } { - global gdb_prompt + global srcfile decimal regsub {\\\(void\\\)} $demangled {\(\)} demangled - gdb_test "info function $name" \ - "File .*:\t(class|)${demangled}.*" \ - "info function for \"$name\"" + set file_re "File .*[string_to_regexp $srcfile]:" + + gdb_test_lines "info function $name" "info function for \"$name\"" \ + [list \ + "$file_re" \ + "$decimal:\t(class|)${demangled}.*"] } # |