From: Doug Evans <dje@google.com>
To: gdb-patches@sourceware.org, pedro@codesourcery.com
Subject: Re: [RFA] Remove set debug lin-lwp-async, new ui_file.to_write_async_safe
Date: Tue, 10 May 2011 20:51:00 -0000 [thread overview]
Message-ID: <BANLkTi=9CkvyMq3HDOKt+ncT-Z=zcPZbJg@mail.gmail.com> (raw)
In-Reply-To: <20110510204641.A4C73246199@ruffy.mtv.corp.google.com>
[sorry for the resend]
Oh, btw, Heh, forgot ... testsuite run is in progress.
Will amend as necessary.
On Tue, May 10, 2011 at 1:46 PM, Doug Evans <dje@google.com> wrote:
>
> Hi.
>
> This patch does two things.
>
> 1) Remove debug_linux_nat_async, replacing all uses with debug_linux_nat.
>
> 2) Fix the debug printf in sigchld_handler.
>
> Adding to_write_async_safe (and the associated scaffolding) just
> for sigchld_handler may seem like a lot, but I *like* having a
> debug printf in sigchld_handler. And given that it might be
> invoked more often now, I think we need to fix it and use a
> more signal-safe debug printer.
> I haven't added the higher level of abstraction (fprintf_unfiltered_async_safe
> or some such) and, e.g. the associated gettimeofday handling.
> That can be done later if it's useful enough.
>
> Pedro mentioned there being a lot more output because of this.
> I like what's there now, but I can imagine some tweaking may
> be needed. I'd like to add some more debug printfs here,
> and I wouldn't mind having "set debug lin-lwp N" where N would
> specify a level of verbosity (0,1,2 at most probably).
>
> Ok to check in?
>
> 2011-05-10 Doug Evans <dje@google.com>
>
> * linux-nat.c (debug_linux_nat_async): Delete.
> Replace all references to use debug_linux_nat instead.
> (show_debug_linux_nat_async): Delete.
> (sigchld_handler): Call ui_file_write_async_safe instead of
> fprintf_unfiltered.
> (_initialize_linux_nat): Remove `set debug lin-lwp-async'.
> * ui-file.c (struct ui_file): New member to_write_async_safe.
> (null_file_write_async_safe): New function.
> (ui_file_write_async_safe): New function.
> (set_ui_file_write_async_safe): New function.
> (stdio_file_new): Initialize to_write_async_safe.
> (stdio_file_write_async_safe): New function.
> * ui-file.h (ui_file_write_async_safe_ftype): New typedef.
> (set_ui_file_write_async_safe): Declare.
> (ui_file_write_async_safe): Declare.
>
> doc/
> * gdb.texinfo (Completion): Update example.
next prev parent reply other threads:[~2011-05-10 20:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 20:47 Doug Evans
2011-05-10 20:51 ` Doug Evans [this message]
2011-05-10 21:30 ` Pedro Alves
2011-05-10 22:19 ` Doug Evans
2011-05-11 7:39 ` Jan Kratochvil
2011-05-11 15:50 ` Doug Evans
2011-05-13 17:32 ` Doug Evans
2011-05-13 19:05 ` Stan Shebs
2011-05-14 5:45 ` Doug Evans
2011-05-10 21:38 ` Pedro Alves
2011-05-10 22:20 ` Doug Evans
2011-05-11 2:50 ` Eli Zaretskii
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='BANLkTi=9CkvyMq3HDOKt+ncT-Z=zcPZbJg@mail.gmail.com' \
--to=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
/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