Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Marc Khouzam" <marc.khouzam@ericsson.com>
To: "Pedro Alves" <pedro@codesourcery.com>
Cc: <gdb-patches@sourceware.org>
Subject: RE: Process exit in multi-process, and gdb's selected thread.
Date: Tue, 17 Feb 2009 18:15:00 -0000	[thread overview]
Message-ID: <6D19CA8D71C89C43A057926FE0D4ADAA06F3083D@ecamlmw720.eamcs.ericsson.se> (raw)
In-Reply-To: <200902171633.15303.pedro@codesourcery.com>

 

> -----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



  reply	other threads:[~2009-02-17 17:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17  3:12 Pedro Alves
2009-02-17 16:33 ` Marc Khouzam
2009-02-17 16:56   ` Pedro Alves
2009-02-17 18:15     ` Marc Khouzam [this message]
2009-02-17 19:08       ` Pedro Alves
2009-02-24 20:23 ` Tom Tromey
2009-03-25 21:46   ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6D19CA8D71C89C43A057926FE0D4ADAA06F3083D@ecamlmw720.eamcs.ericsson.se \
    --to=marc.khouzam@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox