From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix captured_command_loop breakpoint in selftests
Date: Wed, 29 Jul 2020 18:16:46 +0200 [thread overview]
Message-ID: <20200729161645.GA4547@delia> (raw)
Hi,
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.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Fix captured_command_loop breakpoint in selftests
gdb/testsuite/ChangeLog:
2020-07-29 Tom de Vries <tdevries@suse.de>
* lib/selftest-support.exp (selftest_setup): Allow breakpoint at
multiple locations.
---
gdb/testsuite/lib/selftest-support.exp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
index 61647d655e..450fee1b1e 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
reply other threads:[~2020-07-29 16:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200729161645.GA4547@delia \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox