* [PATCH] Add some debugging printfs to linux-nat.c
@ 2014-08-31 18:45 Doug Evans
2014-09-01 9:09 ` Gary Benson
2014-09-13 23:04 ` Doug Evans
0 siblings, 2 replies; 4+ messages in thread
From: Doug Evans @ 2014-08-31 18:45 UTC (permalink / raw)
To: gdb-patches
Hi.
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);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add some debugging printfs to linux-nat.c
2014-08-31 18:45 [PATCH] Add some debugging printfs to linux-nat.c Doug Evans
@ 2014-09-01 9:09 ` Gary Benson
2014-09-01 17:00 ` Doug Evans
2014-09-13 23:04 ` Doug Evans
1 sibling, 1 reply; 4+ messages in thread
From: Gary Benson @ 2014-09-01 9:09 UTC (permalink / raw)
To: gdb-patches
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.
Thanks,
Gary
--
http://gbenson.net/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add some debugging printfs to linux-nat.c
2014-09-01 9:09 ` Gary Benson
@ 2014-09-01 17:00 ` Doug Evans
0 siblings, 0 replies; 4+ messages in thread
From: Doug Evans @ 2014-09-01 17:00 UTC (permalink / raw)
To: Gary Benson; +Cc: gdb-patches
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.]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add some debugging printfs to linux-nat.c
2014-08-31 18:45 [PATCH] Add some debugging printfs to linux-nat.c Doug Evans
2014-09-01 9:09 ` Gary Benson
@ 2014-09-13 23:04 ` Doug Evans
1 sibling, 0 replies; 4+ messages in thread
From: Doug Evans @ 2014-09-13 23:04 UTC (permalink / raw)
To: gdb-patches
Doug Evans <xdje42@gmail.com> writes:
> Hi.
>
> 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.
Committed.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-13 23:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-31 18:45 [PATCH] Add some debugging printfs to linux-nat.c Doug Evans
2014-09-01 9:09 ` Gary Benson
2014-09-01 17:00 ` Doug Evans
2014-09-13 23:04 ` Doug Evans
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).