Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: Simon Marchi <simark@simark.ca>, Tom Tromey <tom@tromey.com>,
	Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [RFC PATCH] gdb: add linux_nat_debug_printf macro
Date: Tue, 18 Aug 2020 23:44:22 -0400	[thread overview]
Message-ID: <c854bd44-93ab-106a-c73a-a4750f1df6da@efficios.com> (raw)
In-Reply-To: <f6d43d4a-4f2d-71ad-0fff-e7c2e9de6917@simark.ca>

On 2020-08-18 11:39 p.m., Simon Marchi wrote:
> On 2020-08-18 10:56 p.m., Simon Marchi wrote:
>> I remember I tried it and didn't like it much.  Printing longer identifiers didn't
>> help readability.  And usually we have enough context to know what the debug
>> statement is about, especially with the [linux-nat] prefix.
> 
> Although when dealing with lambdas (which includes SCOPE_EXIT), it can be quite unhelpful:
> 
>   [infrun] operator(): ...
> 
> With __PRETTY_FUNCTION__ it's a bit better:
> 
>   [infrun] stop_all_threads()::<lambda()>: ...
> 
> For that reason, we should maybe consider using __PRETTY_FUNCTION__.

Ah, now I remember why I didn't like it.  It puts the full prototype of the function:

  [infrun] void handle_inferior_event(execution_control_state*): status->kind = stopped, signal = GDB_SIGNAL_TRAP

You can imagine that it can be quite long, so it adds quite a lot of noise.  We would
need something in between, like __PRETTY_FUNCTION__ but without the parameters.

Simon


      reply	other threads:[~2020-08-19  3:44 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 ` [RFC PATCH] " Tom Tromey
2020-08-19  2:56   ` Simon Marchi
2020-08-19  3:39     ` Simon Marchi
2020-08-19  3:44       ` Simon Marchi [this message]

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=c854bd44-93ab-106a-c73a-a4750f1df6da@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    --cc=tom@tromey.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