public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <xdje42@gmail.com>
To: Gary Benson <gbenson@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Add some debugging printfs to linux-nat.c
Date: Mon, 01 Sep 2014 17:00:00 -0000	[thread overview]
Message-ID: <CAP9bCMS7Pj-tehpsoHaCq3kU7NfMsrfCagoe5YQwNmhCOSz3Tw@mail.gmail.com> (raw)
In-Reply-To: <20140901090312.GA9521@blade.nx>

On Mon, Sep 1, 2014 at 2:03 AM, Gary Benson <gbenson@redhat.com> wrote:
> Hi Doug,
>
> Doug Evans wrote:
>> I found these useful when debugging 17247,17314.
>>
>> 2014-08-31  Doug Evans  <xdje42@gmail.com>
>>
>>       * 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.]

  reply	other threads:[~2014-09-01 17:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-31 18:45 Doug Evans
2014-09-01  9:09 ` Gary Benson
2014-09-01 17:00   ` Doug Evans [this message]
2014-09-13 23:04 ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP9bCMS7Pj-tehpsoHaCq3kU7NfMsrfCagoe5YQwNmhCOSz3Tw@mail.gmail.com \
    --to=xdje42@gmail.com \
    --cc=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).