public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, testsuite] Allow function arguments in bp print match in selftest_setup
@ 2018-06-12 15:15 Tom de Vries
  2018-06-13 12:56 ` Pedro Alves
  0 siblings, 1 reply; 6+ messages in thread
From: Tom de Vries @ 2018-06-12 15:15 UTC (permalink / raw)
  To: gdb-patches

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 $" {

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-06-14 13:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-12 15:15 [PATCH, testsuite] Allow function arguments in bp print match in selftest_setup Tom de Vries
2018-06-13 12:56 ` Pedro Alves
2018-06-14 10:21   ` Tom de Vries
2018-06-14 10:46     ` Pedro Alves
2018-06-14 13:49       ` Tom de Vries
2018-06-14 13:52         ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).