From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31914 invoked by alias); 1 Sep 2014 17:00:44 -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 31901 invoked by uid 89); 1 Sep 2014 17:00:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yh0-f43.google.com Received: from mail-yh0-f43.google.com (HELO mail-yh0-f43.google.com) (209.85.213.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 01 Sep 2014 17:00:38 +0000 Received: by mail-yh0-f43.google.com with SMTP id f73so3553635yha.16 for ; Mon, 01 Sep 2014 10:00:36 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.236.162.7 with SMTP id x7mr43093261yhk.6.1409590836245; Mon, 01 Sep 2014 10:00:36 -0700 (PDT) Received: by 10.170.66.138 with HTTP; Mon, 1 Sep 2014 10:00:36 -0700 (PDT) In-Reply-To: <20140901090312.GA9521@blade.nx> References: <20140901090312.GA9521@blade.nx> Date: Mon, 01 Sep 2014 17:00:00 -0000 Message-ID: Subject: Re: [PATCH] Add some debugging printfs to linux-nat.c From: Doug Evans To: Gary Benson Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00026.txt.bz2 On Mon, Sep 1, 2014 at 2:03 AM, Gary Benson wrote: > 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. All of linux-nat.c doesn't use debug_printf (nor all of gdb/*.c). Let's leave that for another patch and be consistent with what's there now. [I looked for a pending patch to convert gdb/*.c, but couldn't find one, could have missed it though.]