From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13595 invoked by alias); 30 Jul 2011 02:44:26 -0000 Received: (qmail 13583 invoked by uid 22791); 30 Jul 2011 02:44:25 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 30 Jul 2011 02:44:11 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E8C012BB2F0; Fri, 29 Jul 2011 22:44:10 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QyzlSOl99Tte; Fri, 29 Jul 2011 22:44:10 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 7F3A22BB2DE; Fri, 29 Jul 2011 22:44:10 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 40776145615; Fri, 29 Jul 2011 19:44:05 -0700 (PDT) Date: Sat, 30 Jul 2011 11:39:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: pfee@talk21.com, gdb-patches@sourceware.org Subject: Re: Enhancement - show old and new thread info when switching during debugging Message-ID: <20110730024405.GJ5177@adacore.com> References: <1311947955.89527.YahooMailRC@web86708.mail.ird.yahoo.com> <20110729155438.GH5177@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2011-07/txt/msg00820.txt.bz2 > Joel> Isn't that information already present in the previous "[Switching to > Joel> thread ...]" message? > > We can always add an option, like "set print thread previous on" to > control the output. Generally speaking, I prefer to avoid introducing options unless really necessary. In this particular case, it sounds like the most convenient way of solving the problem is to have a convenience variable. And it sounds like the only reason why Paul hasn't looked at the implementation yet is due to lack of familiarity with this code? % grep '"bpnum"' *.c breakpoint.c: set_internalvar_integer (lookup_internalvar ("bpnum"), num); So, I would think that adding something similar in thread.c:switch_to_thread would do the job. -- Joel