This is the mail archive of the gdb-patches@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: [PATCH 2/2] doc: Improve documentation about MI thread output


> From: Simon Marchi <simon.marchi@ericsson.com>
> Date: Wed, 12 Apr 2017 15:26:08 -0400
> 
> >> +there is a selected thread and no @var{thread-id} argument was passed to the
> > 
> > How can there not be a selected thread?
> 
> When the currently selected inferior is not running.  The obvious case is the initial
> state of gdb.  But it's also possible to have threads but none is selected, for example
> when you add a second inferior and switch to it, while the first inferior is running.
> 
> The field is output if inferior_ptid != null_ptid, so maybe there are other situations
> I am not aware of where there isn't a current thread.

I think we need to describe at least the most "popular" situations
where this happens.  The initial state of GDB is not an interesting
case, but others are.  In particular, IMO it would be good to state
that when there's only one inferior being debugged that has been run
already, there will always be a selected thread.

Thanks.


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