Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH, testsuite] Allow function arguments in bp print match in selftest_setup
Date: Tue, 12 Jun 2018 15:15:00 -0000	[thread overview]
Message-ID: <20180612151500.xgw27odexd5fgyww@localhost.localdomain> (raw)

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


             reply	other threads:[~2018-06-12 15:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12 15:15 Tom de Vries [this message]
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

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=20180612151500.xgw27odexd5fgyww@localhost.localdomain \
    --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