From: Tom Tromey <tom@tromey.com>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [RFC PATCH] gdb: add linux_nat_debug_printf macro
Date: Sun, 12 Jul 2020 11:11:12 -0600 [thread overview]
Message-ID: <87y2nopsjz.fsf@tromey.com> (raw)
In-Reply-To: <20200702193034.22279-1-simon.marchi@efficios.com> (Simon Marchi via Gdb-patches's message of "Thu, 2 Jul 2020 15:30:34 -0400")
>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
Simon> To address both of these issues, I suggest adding this macro for
Simon> printing debug statements, which automatically includes the function
Simon> name. It also includes the `[linux-nat]` prefix to clarify which part
Simon> of GDB printed this (I think that ideally, all debug prints would
Simon> include such a tag).
Yeah. After seeing your patch I think all the debug prints should be
done this way.
Simon> The `__func__` magic symbol is used to get the function name.
Simon> Unfortunately, in the case of methods, it only contains the method name,
We could check for GCC and use __PRETTY_FUNCTION__, though that is the
full signature, so it might be pretty long.
Tom
next prev parent reply other threads:[~2020-07-12 17:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 19:30 Simon Marchi
2020-07-03 17:33 ` Joel Brobecker
2020-07-08 21:07 ` [PATCH] " Simon Marchi
2020-07-10 11:47 ` Gary Benson
2020-07-10 13:55 ` Simon Marchi
2020-07-10 14:23 ` Gary Benson
2020-07-13 14:32 ` Joel Brobecker
2020-07-13 14:38 ` Simon Marchi
2020-07-13 14:56 ` Gary Benson
2020-07-12 17:11 ` Tom Tromey [this message]
2020-08-19 2:56 ` [RFC PATCH] " Simon Marchi
2020-08-19 3:39 ` Simon Marchi
2020-08-19 3:44 ` Simon Marchi
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=87y2nopsjz.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.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