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: MI non-stop mode spec


>  > Note that current thread.c implementation will only declare a thread as done
>  > when we do -thread-info (or anything else that calls prune_threads, so the
>  > value of =thread-exited will be limited, without some associated work on
>  > threads layer).
> 
> I'm not sure what you mean.  If I run Gdb normally with a multi-threaded
> application, I get:
> 
> [New Thread -1210639472 (LWP 7235)]
> 
> when a thread is created and:
> 
> [Thread -1210639472 (LWP 7235) exited]
> 
> when it is terminated.

This is historical.  In the earliest gdb thread debugging
implementations, there was no notification on thread exit, 
and gdb only removed a thread from its internal list when
prune_threads was called (which was usually on the "info
threads" command).

More recently, we have SOME thread debugging interfaces that
give us a thread exit notification, but we retain the prune_threads
mechanism as insurance.  So, depending on whose threads you are
using, you may be able to detect thread exit when it happens, 
or you may not.






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