From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simon.marchi@polymtl.ca>,
Simon Marchi <simon.marchi@efficios.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH v2 3/3] gdb: introduce scoped debug prints
Date: Tue, 5 Jan 2021 10:01:43 +0100 [thread overview]
Message-ID: <d32497b1-bd0e-cad1-0d4d-7b11b6718f6a@suse.de> (raw)
In-Reply-To: <3ad3b11f-8a72-cd1d-a138-59c47300f147@polymtl.ca>
On 1/4/21 6:02 PM, Simon Marchi via Gdb-patches wrote:
>
>> With this patch, gdb.threads/stepi-random-signal.exp becomes flaky. I folded
>> this little fixup in the patch:
>>
>> commit 49c94827cbbe802726f177bc61c6c9d830907ffa
>> Author: Simon Marchi <simon.marchi@polymtl.ca>
>> Date: Tue Dec 22 16:33:40 2020 -0500
>>
>> fixup
>>
>> Change-Id: Ibd2f622df3e76c873fcf82bca7c4c7900654647e
>>
>> diff --git a/gdb/testsuite/gdb.threads/stepi-random-signal.exp b/gdb/testsuite/gdb.threads/stepi-random-signal.exp
>> index 9a8b38c2acf5..689de8fdc632 100644
>> --- a/gdb/testsuite/gdb.threads/stepi-random-signal.exp
>> +++ b/gdb/testsuite/gdb.threads/stepi-random-signal.exp
>> @@ -86,12 +86,13 @@ if {$prev_addr == ""} {
>> set seen 0
>>
>> set test "stepi"
>> -if {[gdb_test_multiple "stepi" "$test" {
>> +set prompt "$gdb_prompt \\\[infrun\\\] fetch_inferior_event: exit\r\n$"
>> +if {[gdb_test_multiple "stepi" "$test" -prompt $prompt {
>> -re {\[infrun\] handle_signal_stop: random signal} {
>> set seen 1
>> exp_continue
>> }
>> - -re "$gdb_prompt $" {
>> + -re "$prompt$" {
>> }
>> }] != 0} {
>> return
>>
>>
>> Simon
>>
>
>
> I pushed this series, including this fix.
Hi Simon,
starting this commit, I run into:
...
51 callme ();^M
gdb_expect_list pattern: //
[infrun] infrun_async: enable=0^M
(gdb) [infrun] fetch_inferior_event: exit^M
FAIL: gdb.threads/signal-while-stepping-over-bp-other-thread.exp: step
(pattern 6 + sentinel) (timeout)
...
which before the commit was:
...
51 callme ();^M
gdb_expect_list pattern: //
[infrun] infrun_async: enable=0^M
(gdb) PASS: gdb.threads/signal-while-stepping-over-bp-other-thread.exp: step
...
Using patch below, the test passes for me again.
[ I first tried to override $gdb_prompt for the duration of
gdb_test_sequence using save_vars, but there's the invariant that the
gdb_prompt variable has an implicit " " after it, which
gdb_test_sequence adds, so that didn't work. ]
Thanks,
- Tom
diff --git
a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
b/gdb
/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
index fe842531977..2b3aec6562e 100644
---
a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
+++
b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
@@ -102,12 +102,15 @@ gdb_test "set scheduler-locking off"
gdb_test "set debug infrun 1"
set test "step"
-gdb_test_sequence $test $test {
+send_gdb "$test\n"
+set prompt "$gdb_prompt \\\[infrun\\\] fetch_inferior_event: exit\r\n$"
+gdb_expect_list $test $prompt {
"need to step-over"
"resume_1: step=1,"
"signal arrived while stepping over breakpoint"
"stepped to a different line"
"callme"
+ ""
}
set cnt_after [get_value "args\[$my_number\]" "get count after step"]
next prev parent reply other threads:[~2021-01-05 9:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 20:47 [PATCH v2 1/3] gdb: make "set debug timestamp" work nice with new debug printouts Simon Marchi via Gdb-patches
2020-12-16 20:47 ` [PATCH v2 2/3] gdb: use infrun_debug_printf in print_target_wait_results Simon Marchi via Gdb-patches
2020-12-16 20:47 ` [PATCH v2 3/3] gdb: introduce scoped debug prints Simon Marchi via Gdb-patches
2020-12-22 21:35 ` Simon Marchi via Gdb-patches
2021-01-04 17:02 ` Simon Marchi via Gdb-patches
2021-01-05 9:01 ` Tom de Vries [this message]
2021-01-05 9:23 ` Tom de Vries
2021-01-05 15:33 ` Simon Marchi via Gdb-patches
2021-01-05 17:02 ` Simon Marchi via Gdb-patches
2021-01-05 21:26 ` tdevries
2021-01-05 21:54 ` Simon Marchi via Gdb-patches
2021-01-06 1:00 ` Simon Marchi via Gdb-patches
2021-01-06 7:15 ` Tom de Vries
2021-01-06 19:05 ` Simon Marchi via Gdb-patches
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=d32497b1-bd0e-cad1-0d4d-7b11b6718f6a@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
--cc=simon.marchi@polymtl.ca \
/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