From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12166 invoked by alias); 17 Mar 2009 07:33:42 -0000 Received: (qmail 11871 invoked by uid 22791); 17 Mar 2009 07:33:41 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 Mar 2009 07:33:36 +0000 Received: (qmail 32138 invoked from network); 17 Mar 2009 07:33:31 -0000 Received: from unknown (HELO wind.localnet) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 17 Mar 2009 07:33:31 -0000 From: Vladimir Prus To: Pedro Alves Subject: Re: [3/3] broken -thread-info output in non-stop mode, fix it Date: Tue, 17 Mar 2009 07:50:00 -0000 User-Agent: KMail/1.11.90 (Linux/2.6.24-24-generic; KDE/4.2.65; i686; svn-936416; 2009-03-07) Cc: gdb-patches@sourceware.org References: <200903170623.58562.pedro@codesourcery.com> In-Reply-To: <200903170623.58562.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200903171033.28967.vladimir@codesourcery.com> 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-03/txt/msg00306.txt.bz2 On Tuesday 17 March 2009 09:23:58 Pedro Alves wrote: > This fixes the broken -thread-info output mentioned in this thread: > > http://sourceware.org/ml/gdb-patches/2009-03/msg00236.html > > ... as suggested by Vladimir, the patch makes us output ^running > only if the target was proceeded. I've added a new observer > (about_to_proceed), and implemented Vladimir's suggestion on top of > it. There's this `breakpoint_proceeded' global that is used > by the breakpoint.c module for something very similar, so I've > moved that global into breakpoint.c, and made it static, and then > used the same observer to set it. Since breakpoint_proceeded is > not global anymore, we can't save/restore it when doing infcalls > from infrun.c. What I've done instead, was to make the > about_to_proceed observer in breakpoint.c not set breakpoint_proceeded if > we're about to do an inferior function call. And we know we're doing > an infcall due to this new thread_info->in_infcall flag added by the > previous patch. > > Vladimir, does this look like what you were picturing? Yes, this looks very nice, thank you. - Volodya