diff options
author | Tom de Vries <tdevries@suse.de> | 2020-03-11 17:57:02 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-03-11 17:57:02 +0100 |
commit | f870f78fb2dc15cc5a4738d7ee592b39e2001c4e (patch) | |
tree | 213617636a35ce59e6c21db6d40b62e7a0533060 /gdb/testsuite | |
parent | 97b4a8f744f437fa35afbe20f53e657e9de957cd (diff) | |
download | gdb-f870f78fb2dc15cc5a4738d7ee592b39e2001c4e.zip gdb-f870f78fb2dc15cc5a4738d7ee592b39e2001c4e.tar.gz gdb-f870f78fb2dc15cc5a4738d7ee592b39e2001c4e.tar.bz2 |
[gdb/testsuite] Fix printf regexp in gdb.server/sysroot.exp
When running gdb.server/sysroot.exp, I run into this FAIL:
...
(gdb) continue^M
Continuing.^M
^M
Breakpoint 2, __printf (format=0x4005c4 "Hello World!\n") at printf.c:28^M
28 {^M
(gdb) FAIL: gdb.server/sysroot.exp: sysroot=local: continue to printf
...
for this test:
...
gdb_test "continue" "Breakpoint $decimal.* printf .*" "continue to printf"
...
Without debug info for glibc installed, we have instead:
...
(gdb) continue^M
Continuing.^M
^M
Breakpoint 2, 0x00007ffff773c550 in printf () from /lib64/libc.so.6^M
(gdb) PASS: gdb.server/sysroot.exp: sysroot=local: continue to printf
...
Fix this by allowing for GLIBC's printf alias __printf to be printed:
...
gdb_test "continue" "Breakpoint $decimal.* (__)?printf .*" \
"continue to printf"
...
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-03-11 Tom de Vries <tdevries@suse.de>
* gdb.server/sysroot.exp: Allow GLIBC's printf alias __printf.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.server/sysroot.exp | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5613e86..f7cdea7 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2020-03-11 Tom de Vries <tdevries@suse.de> + * gdb.server/sysroot.exp: Allow GLIBC's printf alias __printf. + +2020-03-11 Tom de Vries <tdevries@suse.de> + * gdb.btrace/reconnect.exp: Allow source line pattern after stepi. 2020-03-11 Tom Tromey <tromey@adacore.com> diff --git a/gdb/testsuite/gdb.server/sysroot.exp b/gdb/testsuite/gdb.server/sysroot.exp index fd6f43b..2c68ebf 100644 --- a/gdb/testsuite/gdb.server/sysroot.exp +++ b/gdb/testsuite/gdb.server/sysroot.exp @@ -73,5 +73,6 @@ foreach_with_prefix sysroot { "local" "remote" } { # Test that we can stop inside a library. gdb_breakpoint printf - gdb_test "continue" "Breakpoint $decimal.* printf .*" "continue to printf" + gdb_test "continue" "Breakpoint $decimal.* (__)?printf .*" \ + "continue to printf" } |