From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7738 invoked by alias); 17 Feb 2009 17:08:22 -0000 Received: (qmail 7617 invoked by uid 22791); 17 Feb 2009 17:08:21 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from imr2.ericy.com (HELO imr2.ericy.com) (198.24.6.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 Feb 2009 17:08:15 +0000 Received: from eusrcmw750.eamcs.ericsson.se (eusrcmw750.exu.ericsson.se [138.85.77.50]) by imr2.ericy.com (8.13.1/8.13.1) with ESMTP id n1HH8Bh9032528; Tue, 17 Feb 2009 11:08:12 -0600 Received: from ecamlmw720.eamcs.ericsson.se ([142.133.1.72]) by eusrcmw750.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Tue, 17 Feb 2009 11:08:06 -0600 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Process exit in multi-process, and gdb's selected thread. Date: Tue, 17 Feb 2009 18:15:00 -0000 Message-ID: <6D19CA8D71C89C43A057926FE0D4ADAA06F3083D@ecamlmw720.eamcs.ericsson.se> In-Reply-To: <200902171633.15303.pedro@codesourcery.com> References: <200902170058.33653.pedro@codesourcery.com> <6D19CA8D71C89C43A057926FE0D4ADAA06F3077B@ecamlmw720.eamcs.ericsson.se> <200902171633.15303.pedro@codesourcery.com> From: "Marc Khouzam" To: "Pedro Alves" Cc: X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-02/txt/msg00352.txt.bz2 =20 > -----Original Message----- > From: Pedro Alves [mailto:pedro@codesourcery.com]=20 > 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. >=20 > On Tuesday 17 February 2009 16:19:55, Marc Khouzam wrote: > > I didn't quite understand what responsibility falls on the=20 > > frontend with this suggestion.=20=20 >=20 > E.g., I'd like to understand what does eclipse do when it > receives a "=3Dthread-group-exited" notification, and the thread > that eclipse had selected disappeared. Was it expecting that > GDB changed to another random thread (and emit a =3Dthread-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=20 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). >=20 > 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