This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: non-stop and current thread exiting
- From: Michael Snyder <msnyder at specifix dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb at sourceware dot org, Marc Khouzam <marc dot khouzam at ericsson dot com>
- Date: Wed, 04 Jun 2008 10:34:08 -0700
- Subject: Re: non-stop and current thread exiting
- References: <200806032253.39575.pedro@codesourcery.com>
On Tue, 2008-06-03 at 22:53 +0100, Pedro Alves wrote:
> I see three possibilities to solve issues like these.
>
> a) Have GDB switch to an arbitrary thread when the
> current thread is gone.
>
> b) Leave the currently selected dead thread in the thread
> list, tag it as dead. Prohibit most commands but "thread"
> and "info threads" in this situation. Get rid of the dead
> thread as soon as the user/frontend switches to another
> thread.
[...]
> c) Allow deleting the current thread anyway, and have it not
> listed in the thread list. Do some internal magic, to point
> the current thread at some "already exited" special thread.
> Prohibit most commands but "thread" and "info threads" in
> this situation. Show something like this or similar
> in "info threads"
>
> (gdb) info threads
> 2 Thread 0xf7d5bb90 (LWP 8506) (running)
> 1 Thread 0xf7d5c6b0 (LWP 8503) (running)
>
> No selected thread.
I kind-of like "no selected thread", and then you could
"prohibit most commands" based on those that depend on
having a selected thread.
But my preference is not strong, and I can see the
desire to have the previously selected thread displayed
temporarily even though it is dead.
Michael