public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
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: Thu, 22 Sep 2016 01:56:00 -0000	[thread overview]
Message-ID: <8b774aba-b24b-c7e6-2951-b24eb658c6a9@ericsson.com> (raw)
In-Reply-To: <07334014-b585-22cd-a555-671f3a89ec4c@ericsson.com>

On 16-09-21 02:29 PM, Simon Marchi wrote:
>> 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.

After messing with this for a while, I think I'll give up for now, unless you
think having that sleep in there is out of the question.  I have been trying to
do roughly this (all-stop mode):

 1. Start inferior 1, break when the two child threads are started.
 2. Setup two thread specific breakpoints (for the two child threads) at the target line.
 3. Do continue twice in a row.

For the first inferior, I get two stops, as expected, because of the two threads
hitting their breakpoint.  For the second inferior, the first "continue" stops, but
the second doesn't, it just hangs forever.  Inspecting the state of the threads at
this moment shows that the thread that did not hit his breakpoint is past it, so it
somehow missed it.  It sounds like a bug in GDB.  I'll try to make a reproducer, but
I don't think the present test should be blocked because of that.

Simon

  reply	other threads:[~2016-09-21 21:38 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 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
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
2016-09-22  1:56           ` Simon Marchi [this message]
2016-09-14 17:46 ` [PATCH master+7.12 v2 2/3] Emit inferior, thread and frame selection events to all UIs Simon Marchi
2016-09-14 18:30   ` Pedro Alves
2016-09-15 16:21     ` Simon Marchi
2016-09-16 18:26       ` 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=8b774aba-b24b-c7e6-2951-b24eb658c6a9@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).