Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simon.marchi@polymtl.ca>, 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 19:15:09 +0100	[thread overview]
Message-ID: <d81d1ee5-3770-1c80-6b4e-72e32c20725c@suse.de> (raw)
In-Reply-To: <c7656f8e-e4e9-2915-43ab-7b68de54dca4@polymtl.ca>

On 1/28/21 7:04 PM, Simon Marchi wrote:
>>>> @@ -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?

Ah, I see.

Well, it's an attempt to be precise about what we accept in the test.
Much in the same way that two subsequent gdb_test do that.

But yeah, I don't think it's really important, so I can drop that part.

Thanks,
- Tom

  reply	other threads:[~2021-01-28 18:15 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
2021-01-28 18:15       ` Tom de Vries [this message]
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=d81d1ee5-3770-1c80-6b4e-72e32c20725c@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --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