aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-06-14 17:39:34 +0200
committerTom de Vries <tdevries@suse.de>2023-06-14 17:39:34 +0200
commitdf3b9a6dfa1f2d4983e06cc21bf7c4cae0947888 (patch)
tree68b936da3225ade64c304ef6c67ff92beca8b4bb /gdb
parent7ade0f1582c417dc74b9449faf2b8dc86469ac9b (diff)
downloadfsf-binutils-gdb-df3b9a6dfa1f2d4983e06cc21bf7c4cae0947888.zip
fsf-binutils-gdb-df3b9a6dfa1f2d4983e06cc21bf7c4cae0947888.tar.gz
fsf-binutils-gdb-df3b9a6dfa1f2d4983e06cc21bf7c4cae0947888.tar.bz2
[gdb/testsuite] Fix gdb.base/step-over-exit.exp with glibc debuginfo
In test-case gdb.base/step-over-exit.exp, we set a breakpoint on _exit and continue, expecting to hit the breakpoint. Without glibc debug info installed, we have with target board unix/-m64: ... Thread 2.1 "step-over-exit" hit Breakpoint 2.2, 0x00007ffff7d46aee in \ _exit () from /lib64/libc.so.6^M (gdb) PASS: gdb.base/step-over-exit.exp: continue to exit ... and with target board unix/-m32: ... Thread 2.1 "step-over-exit" hit Breakpoint 2.2, 0xf7d84c25 in _exit () from \ /lib/libc.so.6^M (gdb) PASS: gdb.base/step-over-exit.exp: continue to exit ... However after installing debug info (packages glibc-debuginfo and glibc-32bit-debuginfo), we have for -m64 (note: __GI__exit instead of _exit): ... Thread 2.1 "step-over-exit" hit Breakpoint 2.2, \ __GI__exit (status=<optimized out>) at \ ../sysdeps/unix/sysv/linux/_exit.c:27^M 27 {^M (gdb) PASS: gdb.base/step-over-exit.exp: continue to exit ... and -m32 (note: _Exit instead of _exit): ... Thread 2.1 "step-over-exit" hit Breakpoint 2.2, _Exit () at \ ../sysdeps/unix/sysv/linux/i386/_exit.S:24^M 24 ../sysdeps/unix/sysv/linux/i386/_exit.S: No such file or directory.^M (gdb) FAIL: gdb.base/step-over-exit.exp: continue to exit ... The gdb_test allows for both _exit and __GI__exit, but not _Exit: ... gdb_test "continue" \ "Continuing\\..*Breakpoint $decimal.*_exit \\(.*\\).*" \ "continue to exit" ... Fix this by allowing _Exit as well. Tested on x86_64-linux.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.base/step-over-exit.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/step-over-exit.exp b/gdb/testsuite/gdb.base/step-over-exit.exp
index 6e975c6..2a2a98a 100644
--- a/gdb/testsuite/gdb.base/step-over-exit.exp
+++ b/gdb/testsuite/gdb.base/step-over-exit.exp
@@ -49,7 +49,7 @@ gdb_test "break _exit" "Breakpoint $decimal at .*"
# Hit the breakpoint on _exit. The address of syscall insn is recorded.
gdb_test "continue" \
- "Continuing\\..*Breakpoint $decimal.*_exit \\(.*\\).*" \
+ "Continuing\\..*Breakpoint $decimal.*_\[eE\]xit \\(.*\\).*" \
"continue to exit"
gdb_test "display/i \$pc" ".*"