From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23466 invoked by alias); 4 Jun 2008 17:34:34 -0000 Received: (qmail 23454 invoked by uid 22791); 4 Jun 2008 17:34:30 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 04 Jun 2008 17:34:10 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id E03B03C605; Wed, 4 Jun 2008 10:34:08 -0700 (PDT) Subject: Re: non-stop and current thread exiting From: Michael Snyder To: Pedro Alves Cc: gdb@sourceware.org, Marc Khouzam In-Reply-To: <200806032253.39575.pedro@codesourcery.com> References: <200806032253.39575.pedro@codesourcery.com> Content-Type: text/plain Date: Wed, 04 Jun 2008 17:34:00 -0000 Message-Id: <1212600848.3601.336.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-7.fc7) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-06/txt/msg00023.txt.bz2 On Tue, 2008-06-03 at 22:53 +0100, Pedro Alves wrote: > I see three possibilities to solve issues like these. > > a) Have GDB switch to an arbitrary thread when the > current thread is gone. > > b) Leave the currently selected dead thread in the thread > list, tag it as dead. Prohibit most commands but "thread" > and "info threads" in this situation. Get rid of the dead > thread as soon as the user/frontend switches to another > thread. [...] > c) Allow deleting the current thread anyway, and have it not > listed in the thread list. Do some internal magic, to point > the current thread at some "already exited" special thread. > Prohibit most commands but "thread" and "info threads" in > this situation. Show something like this or similar > in "info threads" > > (gdb) info threads > 2 Thread 0xf7d5bb90 (LWP 8506) (running) > 1 Thread 0xf7d5c6b0 (LWP 8503) (running) > > No selected thread. I kind-of like "no selected thread", and then you could "prohibit most commands" based on those that depend on having a selected thread. But my preference is not strong, and I can see the desire to have the previously selected thread displayed temporarily even though it is dead. Michael