From: Simon Marchi <simon.marchi@ericsson.com>
To: Pedro Alves <palves@redhat.com>, Simon Marchi <simon.marchi@polymtl.ca>
Cc: <gdb-patches@sourceware.org>,
Antoine Tremblay <antoine.tremblay@ericsson.com>
Subject: Re: [PATCH master+7.12 v2 3/3] Add test for user context selection sync
Date: Wed, 21 Sep 2016 21:38:00 -0000 [thread overview]
Message-ID: <07334014-b585-22cd-a555-671f3a89ec4c@ericsson.com> (raw)
In-Reply-To: <3daec8aa-b88a-e0a1-fe63-4574ef09fbbe@redhat.com>
On 16-09-21 12:40 PM, Pedro Alves wrote:
>> Oops, while trying to rerun the full testsuite, I noticed that it leaves
>> "-ex \"set non-stop 1\"" in the GDBFLAGS... that's not good. You can
>> see it easily if you swap the order of the "all-stop" and "non-stop"
>> variations. Can you spot why the save_vars isn't working as intended?
>> When I use a temporary variable instead, it works as intended...
>
> Did you ever figure this out?
As you found and mentioned on IRC, it was a stray invisible character:
save_vars { <stray>GDBFLAGS } {
...
}
The result was that <stray>GDBFLAGS was saved, instead of GDBFLAGS... I
would have searched for so long, so thanks a lot!
> What I've done in the past is something very much like your breakpoints
> idea. Though, instead of a thread-specific breakpoint, I used a normal
> breakpoint + "set scheduler-locking on" to control which thread got to
> the breakpoint. See multiple-step-overs.exp, for example.
> Using a thread-specific breakpoint maybe makes that a little simpler,
> worth a try.
I'll try and send an updated patch if it works.
>>> gdb_test_multiple ?
>>
>> Like this?
>>
>> set test "interrupt thread $inf.2"
>>
>> send_gdb "interrupt\n"
>> gdb_test_multiple "" $test {
>> -re "Thread.*2.*stopped" {
>> pass $test
>> }
>> }
>
> No need for the separate send_gdb call:
>
> set test "interrupt thread $inf.2"
> gdb_test_multiple "interrupt" $test {
> -re "Thread.*2.*stopped" {
> pass $test
> }
> }
Yep, it works fine with that.
>> I think that will go in the same basket as the fact that any MI command
>> with --thread currently changes the selected thread silently (without
>> any =thread-selected event). Currently, --thread changes the thread tot
>> he desired one, then when the mi_cmd_thread_select tries to change the
>> thread, it thinks that it was already the current thread, so that an
>> event isn't necessary. This should get fixed in the next iteration,
>> when we split the concepts of user-selected-ptid and
>> internally-selected-ptid. Specifying --thread won't mess with the
>> user-selected-ptid, but if you do "-thread-select --thread 2 2", then
>> mi_cmd_thread_select will change the user-selected-ptid, generating an
>> event.
>>
>> It's not pretty to leave it like this in the test though. Should I
>> create a bug right now and kfail it? Leave it commented out but put a
>> better description?
>
> There's no right or wrong answer, but since you've already written the
> bits, I'd be inclined to file bug and kfail.
Ok I'll do that.
Thanks,
Simon
next prev parent reply other threads:[~2016-09-21 18:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-14 17:46 [PATCH master+7.12 v2 0/3] Emit user selection change notifications on all UIs Simon Marchi
2016-09-14 17:46 ` [PATCH master+7.12 v2 2/3] Emit inferior, thread and frame selection events to " Simon Marchi
2016-09-14 18:30 ` Pedro Alves
2016-09-15 16:21 ` Simon Marchi
2016-09-16 18:26 ` Pedro Alves
2016-09-14 17:46 ` [PATCH master+7.12 v2 3/3] Add test for user context selection sync Simon Marchi
2016-09-14 19:31 ` Pedro Alves
2016-09-16 2:02 ` Simon Marchi
2016-09-21 16:43 ` Pedro Alves
2016-09-21 21:38 ` Simon Marchi [this message]
2016-09-22 1:56 ` Simon Marchi
2016-09-14 17:46 ` [PATCH master+7.12 v2 1/3] Introduce cleanup to restore current_uiout Simon Marchi
2016-09-14 17:56 ` Pedro Alves
2016-09-15 3:24 ` Simon Marchi
2016-09-16 18:18 ` Pedro Alves
[not found] ` <0c9914b2-f012-3b59-f127-04e70a7f867a@ericsson.com>
2016-10-03 21:25 ` Simon Marchi
2016-09-14 18:11 ` Tom Tromey
2016-09-14 18:18 ` Simon Marchi
2016-09-14 18:32 ` Pedro Alves
2016-09-14 19:12 ` Tom Tromey
2016-09-15 3:17 ` Simon Marchi
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=07334014-b585-22cd-a555-671f3a89ec4c@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=antoine.tremblay@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.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