From: Pedro Alves <palves@redhat.com>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH, testsuite] Allow function arguments in bp print match in selftest_setup
Date: Wed, 13 Jun 2018 12:56:00 -0000 [thread overview]
Message-ID: <8f1dae31-ac6c-74e2-1851-ca885193aa89@redhat.com> (raw)
In-Reply-To: <20180612151500.xgw27odexd5fgyww@localhost.localdomain>
On 06/12/2018 04:15 PM, Tom de Vries wrote:
> Hi,
>
> atm selftest.exp fails for me.
>
[1]
> 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?
Yes, please push.
[1] Funny, it passes for me (with the fix for stopping at captured_main),
because the pattern below the one you're touching matches:
-re "Starting program.*Breakpoint \[0-9\]+,.* at .*main.c:.*$function.*$gdb_prompt $" {
# $function may be inlined, so the program stops at the line
# calling $function.
pass "$description"
}
and it only happens to match because captured_main calls
captured_main_1 first thing, which coincidentally
matches "$function.*":
Breakpoint 1, captured_main (data=<optimized out>) at gdb/binutils-gdb/src/gdb/main.c:1147
1147 captured_main_1 (context);
That would probably be better "$function .*", with a space, but I
think that even better, we should try removing the "may be inlined" case
too now, because since ddfe970e6bec ("Don't elide all inlined frames") GDB
presents the stop at the inline function instead of at the caller.
Like below. Comments?
From: Pedro Alves <palves@redhat.com>
Date: 2018-06-13 13:44:16 +0100
remove inline
---
gdb/testsuite/lib/selftest-support.exp | 5 -----
1 file changed, 5 deletions(-)
diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
index f7169e0955e..c05f3b119be 100644
--- a/gdb/testsuite/lib/selftest-support.exp
+++ b/gdb/testsuite/lib/selftest-support.exp
@@ -94,11 +94,6 @@ proc selftest_setup { executable function } {
-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 $" {
- # $function may be inlined, so the program stops at the line
- # calling $function.
- pass "$description"
- }
-re "vfork: No more processes.*$gdb_prompt $" {
fail "$description (out of virtual memory)"
set timeout $oldtimeout
Thanks,
Pedro Alves
next prev parent reply other threads:[~2018-06-13 12:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 15:15 Tom de Vries
2018-06-13 12:56 ` Pedro Alves [this message]
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=8f1dae31-ac6c-74e2-1851-ca885193aa89@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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