This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH, testsuite] Allow function arguments in bp print match in selftest_setup
- From: Tom de Vries <tdevries at suse dot de>
- To: gdb-patches at sourceware dot org
- Date: Tue, 12 Jun 2018 17:15:00 +0200
- Subject: [PATCH, testsuite] Allow function arguments in bp print match in selftest_setup
Hi,
atm selftest.exp fails for me.
One of the reasons is that setting the breakpoint on captured_main and running
to it gives us:
...
Breakpoint 1, captured_main (data=data@entry=0x7fffffffdb80) at main.c:1144
...
while the matching in selftest_setup only allows '()', like this:
...
Breakpoint 1, captured_main () at main.c:1144
...
The patch fixes this by allowing for random strings inbetween the parentheses.
Tested selftest.exp (with two other selftest.exp related fixes applied).
OK for trunk?
Thanks,
- Tom
[gdb] Allow function arguments in bp print match in selftest_setup
2018-06-12 Tom de Vries <tdevries@suse.de>
* lib/selftest-support.exp (selftest_setup): Allow function arguments in
matching of breakpoint printing.
---
gdb/testsuite/lib/selftest-support.exp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
index f7169e0955..0542861e78 100644
--- a/gdb/testsuite/lib/selftest-support.exp
+++ b/gdb/testsuite/lib/selftest-support.exp
@@ -88,10 +88,10 @@ proc selftest_setup { executable function } {
set description "run until breakpoint at $function"
gdb_test_multiple "run $INTERNAL_GDBFLAGS" "$description" {
- -re "Starting program.*Breakpoint \[0-9\]+,.*$function \\(\\).* at .*main.c:.*$gdb_prompt $" {
+ -re "Starting program.*Breakpoint \[0-9\]+,.*$function \\(.*\\).* at .*main.c:.*$gdb_prompt $" {
pass "$description"
}
- -re "Starting program.*Breakpoint \[0-9\]+,.*$function \\(\\).*$gdb_prompt $" {
+ -re "Starting program.*Breakpoint \[0-9\]+,.*$function \\(.*\\).*$gdb_prompt $" {
xfail "$description (line numbers scrambled?)"
}
-re "Starting program.*Breakpoint \[0-9\]+,.* at .*main.c:.*$function.*$gdb_prompt $" {