diff options
author | Tom de Vries <tdevries@suse.de> | 2020-07-29 18:16:26 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-07-29 18:16:26 +0200 |
commit | 90fd07fcd3e6af8679df55b67482d5c8ab8dd9b9 (patch) | |
tree | 2219e548237dec6e4f719f745ff4cd5c341d4a06 /gdb/testsuite | |
parent | a69ee13f5a5223f00636fbafe583a40eeb9b1f3a (diff) | |
download | gdb-90fd07fcd3e6af8679df55b67482d5c8ab8dd9b9.zip gdb-90fd07fcd3e6af8679df55b67482d5c8ab8dd9b9.tar.gz gdb-90fd07fcd3e6af8679df55b67482d5c8ab8dd9b9.tar.bz2 |
[gdb/testsuite] Fix captured_command_loop breakpoint in selftests
When building gcc with CFLAGS/CXXFLAGS="-O2 -g", and running the regression
tests, I run into the following FAILs:
...
FAIL: gdb.gdb/complaints.exp: breakpoint in captured_command_loop
FAIL: gdb.gdb/python-interrupts.exp: breakpoint in captured_command_loop
FAIL: gdb.gdb/python-selftest.exp: breakpoint in captured_command_loop
...
The problem is that when setting the breakpoint at captured_command_loop:
...
(gdb) break captured_command_loop^M
Breakpoint 1 at 0x4230ed: captured_command_loop. (2 locations)^M
(gdb) FAIL: gdb.gdb/complaints.exp: breakpoint in captured_command_loop
...
there are two breakpoint locations instead of one. This is due to
PR26096 - "gdb sets breakpoint at cold clone":
...
$ nm gdb | grep captured_command_loop| c++filt
0000000000659f20 t captured_command_loop()
00000000004230ed t captured_command_loop() [clone .cold]
...
Work around this by allowing multiple breakpoint locations for
captured_command_loop.
Reg-tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-07-29 Tom de Vries <tdevries@suse.de>
* lib/selftest-support.exp (selftest_setup): Allow breakpoint at
multiple locations.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/lib/selftest-support.exp | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d4d0813..656e59d 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2020-07-29 Tom de Vries <tdevries@suse.de> + * lib/selftest-support.exp (selftest_setup): Allow breakpoint at + multiple locations. + +2020-07-29 Tom de Vries <tdevries@suse.de> + * gdb.dwarf2/dw2-line-number-zero.exp: Set breakpoints on lines rather than function name. diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp index 61647d6..450fee1 100644 --- a/gdb/testsuite/lib/selftest-support.exp +++ b/gdb/testsuite/lib/selftest-support.exp @@ -76,9 +76,10 @@ proc selftest_setup { executable function } { return -1 } - # Set a breakpoint at main + # Set a breakpoint at main. Allow more than one location, as + # workaround for PR26096 - "gdb sets breakpoint at cold clone". gdb_test "break $function" \ - "Breakpoint.*at.* file.*, line.*" \ + "Breakpoint.*at.* (file.*, line|locations).*" \ "breakpoint in $function" # run yourself |