This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: MI threads behaviour
- From: Daniel Jacobowitz <drow at false dot org>
- To: Vladimir Prus <vladimir at codesourcery dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 9 Jul 2008 17:03:11 -0400
- Subject: Re: MI threads behaviour
- References: <200806181601.52404.vladimir@codesourcery.com>
On Wed, Jun 18, 2008 at 04:01:52PM +0400, Vladimir Prus wrote:
> The CLI behaviour of setting GDB current thread to invalid value if the
> current thread exits will be preserved, but is of limited value, since
> the frontend does not depend on current thread directly, and will be notified
> about thread exit anyway. Therefore, no notification will be emitted in
> this case.
What about in all-stop mode, where the CLI behavior is to change to a
new event thread?
> The notification will be emitted even if the thread user requested to be
> selected is the same as currently selected thread. Imagine the frontend
> has two windows open -- in one, UI has thread 1 selected, and in another,
> UI has thread 2 selected. If user types "thread 2" in GDB console in the
> first window, would expect the first window UI to switch to thread 2. So,
> the notification should be emitted even if GDB current thread is 2,
> already.
I don't understand the need for this. If you're going to let the user
type a CLI command, then before you can do that you have to make sure
GDB and the UI are synchronized on the current thread/frame.
Otherwise "backtrace" or "thread" won't work.
--
Daniel Jacobowitz
CodeSourcery