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: Process exit in multi-process, and gdb's selected thread.


 

> -----Original Message-----
> From: Pedro Alves [mailto:pedro@codesourcery.com] 
> Sent: Tuesday, February 17, 2009 11:33 AM
> To: Marc Khouzam
> Cc: gdb-patches@sourceware.org
> Subject: Re: Process exit in multi-process, and gdb's selected thread.
> 
> On Tuesday 17 February 2009 16:19:55, Marc Khouzam wrote:
> > I didn't quite understand what responsibility falls on the 
> > frontend with this suggestion.  
> 
> E.g., I'd like to understand what does eclipse do when it
> receives a "=thread-group-exited" notification, and the thread
> that eclipse had selected disappeared.  Was it expecting that
> GDB changed to another random thread (and emit a =thread-selected
> notification), or was it supposed to select another thread itself?
> Or, does it also have a state of "no thread selected" in the UI?

We use the --thread flag for all our MI commands where a thread
makes sense.  Therefore we don't need GDB to have a currently 
selected thread.

This may be a little more tricky when dealing with the console
that the user writes too.  However, the user could simply
select a thread if none are currently selected.

> > I wanted to try to patch to see what you meant more clearly.
> > However, I think this patch applies to HEAD but HEAD does
> > not work with my stub yet (the -list-thread-groups --available
> > problem).
> 
> Oh, bummer.  I thought you'd have some way to manually specify which
> process to attach to without going through that listing.

Now that you mention it... :-)
So I was able to try it with HEAD.
At first glance, things look very good.  I was able to detach from
all processes and re-attach.  When detached from all processes, I ran
the 'info threads' commands and the result was empty, so I know there
was not thread selected.  But I did not get any errors and was able
to attach/detach, multiple times.

The only thing that gave me trouble was that auto-attach was triggered
from my Stub but I don't think HEAD deals with it perfectly, so I got
"No registers" when running -list-thread-groups after an auto-attach.

Bottom line is that this patch is very promising.
Good stuff!

Marc



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