This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: non-stop and current thread exiting


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]