Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pawel Piech <pawel.piech@windriver.com>
To: Marc Khouzam <marc.khouzam@ericsson.com>
Cc: Daniel Jacobowitz <drow@false.org>,
	        Vladimir Prus <vladimir@codesourcery.com>,
	gdb@sources.redhat.com
Subject: Re: MI threads behaviour
Date: Mon, 14 Jul 2008 15:56:00 -0000	[thread overview]
Message-ID: <487B76FC.1090403@windriver.com> (raw)
In-Reply-To: <6D19CA8D71C89C43A057926FE0D4ADAA04291230@ecamlmw720.eamcs.ericsson.se>

Marc Khouzam wrote:
>> The =thread-selected notification, in this case, should be interpreted to
>> mean:
>>    (1) User's request that the selected thread be changed, and
>>    (2) Notification that GDB current thread has changed
>> The (2) trait does not matter if --thread is used, but in this case the
>> frontend need to use this information to figure if -thread-select should be
>> sent.
>>     
>
> Here, I believe there is a race condition.  In the example you give above with
> two windows, one window could send a CLI command changing the thread, but
> the second window may send an MI command, before receiving the
> =thread-selected notification and will act on the wrong thread.
> I don't see how we could fix this.
> Or maybe I misunderstood your explanation?
>   
Hi Marc,
I seem to remember that we talked about the fact that there is a race 
condition and decided that it is unavoidable.  Our proposed workaround 
was to force the client to wait for the result of each CLI command 
before issuing another CLI or MI command.  This is certainly 
inconvenient, but given the fact that it only applies to CLI commands, 
it should not have a performance impact.

Cheers,
Pawel


  reply	other threads:[~2008-07-14 15:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-18 12:02 Vladimir Prus
2008-07-08  5:29 ` Vladimir Prus
2008-07-09 21:03 ` Daniel Jacobowitz
2008-07-10 13:14   ` Marc Khouzam
2008-07-14 15:56     ` Pawel Piech [this message]
2008-07-14 16:04       ` Marc Khouzam
2008-07-14 20:27         ` Pawel Piech
2008-07-16 11:51   ` Vladimir Prus
2008-07-16 12:11     ` Daniel Jacobowitz
2008-07-16 12:52       ` Vladimir Prus
2008-07-16 13:08         ` Daniel Jacobowitz
2008-07-16 13:23           ` Vladimir Prus
2008-07-16 13:33             ` Daniel Jacobowitz

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=487B76FC.1090403@windriver.com \
    --to=pawel.piech@windriver.com \
    --cc=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=marc.khouzam@ericsson.com \
    --cc=vladimir@codesourcery.com \
    /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