From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/testsuite] Fix gdb.opt/solib-intra-step.exp with -m32 and gcc-10
Date: Thu, 28 Jan 2021 13:04:44 -0500 [thread overview]
Message-ID: <c7656f8e-e4e9-2915-43ab-7b68de54dca4@polymtl.ca> (raw)
In-Reply-To: <8713098d-e196-bf9d-3b8f-a8d2920e7caa@suse.de>
>>> @@ -89,7 +89,7 @@ gdb_test_multiple "step" $test {
>>> exp_continue
>>> }
>>> -re -wrap "get_pc_thunk.*" {
>>> - if { $state != 1 } {
>>> + if { $state != 0 && $state != 1 } {
>>> set state -1
>>> } else {
>>> set state 2
>>>
>>
>> I don't really understand what happens here, what state value means what.
>>
>> A bit of commenting would help.
>
> I tried to add comments but didn't manage to come up with something
> sensible.
>
> Instead, I simplified gdb_test_multiple to just track the order of
> events, and then added a few asserts about order of events.
>
> I hope this clarifies what the test is trying to do. WDYT?
Hmm, it's still not clear to me what the intention of the test is. It's
not clear what kind of good or bad behavior from GDB we are looking for.
That intention needs to be recorded in a comment, otherwise, I can't
tell if the code matches what we want (since I don't know what we want).
I kind of understand now that we do a step, we want to get until the
"first-hit" line (or "second-hit" in the second case), but it's possible
that we land on intermediary states, which are acceptable. But there
also seems to be an ordering component? Why is that important? Why
don't we simply "exp_continue" when seeing "retry" or "get_pc_thunk",
why bother recording anything?
Simon
next prev parent reply other threads:[~2021-01-28 18:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 18:03 Tom de Vries
2021-01-28 15:03 ` Simon Marchi via Gdb-patches
2021-01-28 17:50 ` Tom de Vries
2021-01-28 18:04 ` Simon Marchi via Gdb-patches [this message]
2021-01-28 18:15 ` Tom de Vries
2021-01-28 18:20 ` Simon Marchi via Gdb-patches
2021-01-29 10:44 ` Tom de Vries
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=c7656f8e-e4e9-2915-43ab-7b68de54dca4@polymtl.ca \
--to=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
--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