From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 957 invoked by alias); 1 Sep 2014 09:09:06 -0000 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 Received: (qmail 939 invoked by uid 89); 1 Sep 2014 09:09:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 01 Sep 2014 09:09:03 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8198wK8015859 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 1 Sep 2014 05:09:02 -0400 Received: from blade.nx (ovpn-116-113.ams2.redhat.com [10.36.116.113]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8193CeX008919 for ; Mon, 1 Sep 2014 05:03:13 -0400 Received: by blade.nx (Postfix, from userid 1000) id 2CB212640D7; Mon, 1 Sep 2014 10:03:12 +0100 (BST) Date: Mon, 01 Sep 2014 09:09:00 -0000 From: Gary Benson To: gdb-patches@sourceware.org Subject: Re: [PATCH] Add some debugging printfs to linux-nat.c Message-ID: <20140901090312.GA9521@blade.nx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00012.txt.bz2 Hi Doug, Doug Evans wrote: > I found these useful when debugging 17247,17314. > > 2014-08-31 Doug Evans > > * linux-nat.c (wait_lwp): Add debugging printf. > (linux_nat_wait_1): Ditto. > > diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c > index 0898442..557c84b 100644 > --- a/gdb/linux-nat.c > +++ b/gdb/linux-nat.c > @@ -2311,6 +2311,8 @@ wait_lwp (struct lwp_info *lp) > again before it gets to sigsuspend so we can safely let the handlers > get executed here. */ > > + if (debug_linux_nat) > + fprintf_unfiltered (gdb_stdlog, "WL: about to sigsuspend\n"); > sigsuspend (&suspend_mask); > } > > @@ -3441,6 +3443,8 @@ retry: > gdb_assert (lp == NULL); > > /* Block until we get an event reported with SIGCHLD. */ > + if (debug_linux_nat) > + fprintf_unfiltered (gdb_stdlog, "LNW: about to sigsuspend\n"); > sigsuspend (&suspend_mask); > } Please use debug_printf. Thanks, Gary -- http://gbenson.net/