From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12796 invoked by alias); 29 Jul 2011 16:08:23 -0000 Received: (qmail 12785 invoked by uid 22791); 29 Jul 2011 16:08:21 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from nm2-vm0.bt.bullet.mail.ird.yahoo.com (HELO nm2-vm0.bt.bullet.mail.ird.yahoo.com) (212.82.108.92) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Fri, 29 Jul 2011 16:08:05 +0000 Received: from [212.82.108.228] by nm2.bt.bullet.mail.ird.yahoo.com with NNFMP; 29 Jul 2011 16:08:03 -0000 Received: from [212.82.108.224] by tm1.bt.bullet.mail.ird.yahoo.com with NNFMP; 29 Jul 2011 16:08:03 -0000 Received: from [127.0.0.1] by omp1001.bt.mail.ird.yahoo.com with NNFMP; 29 Jul 2011 16:08:03 -0000 Received: (qmail 99653 invoked by uid 60001); 29 Jul 2011 16:08:03 -0000 Received: from [94.72.254.2] by web86704.mail.ird.yahoo.com via HTTP; Fri, 29 Jul 2011 17:08:03 BST References: <1311947955.89527.YahooMailRC@web86708.mail.ird.yahoo.com> <20110729155438.GH5177@adacore.com> Message-ID: <1311955683.74296.YahooMailRC@web86704.mail.ird.yahoo.com> Date: Fri, 29 Jul 2011 16:33:00 -0000 From: pfee@talk21.com Subject: Re: Enhancement - show old and new thread info when switching during debugging To: Joel Brobecker Cc: gdb-patches@sourceware.org In-Reply-To: <20110729155438.GH5177@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: 2011-07/txt/msg00811.txt.bz2 > > The following patch is also attached to bug 13042. > > http://sourceware.org/bugzilla/show_bug.cgi?id=3D13042 > >=20 > > It gives the user info about the thread they're switching from in > > addition to that which they're switching to. This is useful if the > > switch was not intended and they wish to continue debugging the old > > thread. >=20 > Isn't that information already present in the previous "[Switching to > thread ...]" message? I've copied output from GDB 7.3 before and after my patch into the bug repo= rt=20 along with some notes on the implementation. Without the patch the user is told what thread they're switching to, but no= t=20 what thread they're switching from, e.g. [Switching to Thread 0x7ffff7fd6700 (LWP 4267)] In a program with numerous threads, the old thread may be the one the user = is=20 interested it. They may not have wanted to switch, but by chance the new t= hread=20 has hit a breakpoint. By giving information about what thread we're switch= ing=20 away from, it becomes easier for the user to switch back to that thread and= =20 ignore the accidental thread switch. Example of new output: [Switching from Thread 0x7ffff7fd8740 (LWP 4279) to Thread 0x7ffff7fd6700 (= LWP=20 4282)]Thanks, Paul