Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 0/2] info breakpoints improvements
Date: Mon, 23 May 2022 18:06:22 +0100	[thread overview]
Message-ID: <869dd733-daae-ad7d-b53e-435d85d10406@palves.net> (raw)
In-Reply-To: <835ym0d9v8.fsf@gnu.org>

On 2022-05-20 06:57, Eli Zaretskii wrote:
>> From: Pedro Alves <pedro@palves.net>
>> Date: Thu, 19 May 2022 22:55:50 +0100
>>
>> we get:
>>
>>  (top-gdb) info breakpoints
>>  Num     Type           Disp Enb Address            What
>>  1       breakpoint     keep y                      internal_error
>>   1.1                        y   0x00000000005755a5 in internal_error(char const*, int, char const*, ...) at src/gdb/common/errors.c:54
>>  2       breakpoint     keep y                      -qualified internal_error
>>   2.1                        y   0x00000000005755a5 in internal_error(char const*, int, char const*, ...) at src/gdb/common/errors.c:54
>>  3       breakpoint     keep y                      errors.c:54
>>   3.1                        y   0x00000000005755a5 in internal_error(char const*, int, char const*, ...) at src/gdb/common/errors.c:54
>>   3.2                        y   0x00007ffff6d50410 in PyErr_SetObject at /usr/src/debug/python2-2.7.15-4.fc27.x86_64/Python/errors.c:54
>>  4       breakpoint     keep y                      gdb.c:27
>>   4.1                        y   0x000055555564107b in main(int, char**) at src/gdb/gdb.c:28
>>  (top-gdb)
> 
> I must confess that the new display is much more cluttered, and
> includes redundant information, so it's harder to read.  It also makes
> the important stuff harder to find.  Why exactly is this deemed as
> improvement, and in particular, why would we want this behavior as the
> default?  (I won't mind to have this as opt-in behavior, if someone
> finds this useful in some situations.)

None of the information is actually redundant.  The "Enb" column shows
a different "y", as you can disable a whole breakpoint, or its locations
independently.  The "What" column is showing different things for the breakpoint
and its locations.  I've explained in a lot of detail why I think we want this
in the commit log of patch #1, and now in the reply to your review of patch #1 too.

> 
>> Patch #2 introduces an "info breakpoints -hide-locations" option.
>> With that, you get just the breakpoint header rows, showing the
>> canonical location spec originally used to set the breakpoint, but not
>> what the spec expanded to:
>>
>>  (top-gdb) i b -h
>>  Num     Type           Disp Enb What
>>  1       breakpoint     keep y   internal_error
>>  2       breakpoint     keep y   -qualified internal_error
>>  3       breakpoint     keep y   errors.c:54
> 
> If we want a concise display that only shows the important parts, I'd
> lose the "Disp" column.

I'm not sure how you're determining "important".  That'd make it impossible to
distinguish a "break" from a "tbreak".  I'm only after hiding the breakpoint locations.
I.e., I want to still see all information about each of the breakpoints, just not
its resolved locations.   I only made -hide-locations skip the "Address" column because it
would always be empty otherwise.  For example, here I set a tbreak, and I have a
silent breakpoint:

 (top-gdb) info breakpoints -h
 Num     Type           Disp Enb What
 1       breakpoint     keep y   internal_error
 2       breakpoint     keep y   info_command
         silent
         return
 3       breakpoint     keep y   main
         breakpoint already hit 1 time
 4       breakpoint     del  y   get_selected_frame
         stop only if debug_infrun > 0

So, a more concise display may be interesting, but I'd like to think of it as
a separate feature.

  reply	other threads:[~2022-05-23 17:06 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 21:55 Pedro Alves
2022-05-19 21:55 ` [PATCH 1/2] Always show locations for breakpoints & show canonical location spec Pedro Alves
2022-05-20  6:45   ` Eli Zaretskii via Gdb-patches
2022-05-23 17:04     ` [PATCH v2 " Pedro Alves
2022-05-24 13:06       ` Eli Zaretskii via Gdb-patches
2022-05-25 19:32         ` Pedro Alves
2022-05-26 12:48           ` Eli Zaretskii via Gdb-patches
2022-05-26 14:04             ` Pedro Alves
2022-05-26 15:03               ` Eli Zaretskii via Gdb-patches
2022-05-26 15:10                 ` Pedro Alves
2022-05-26 15:33                   ` Eli Zaretskii via Gdb-patches
2022-05-26 19:29                 ` Pedro Alves
2022-05-26 19:55                   ` Eli Zaretskii via Gdb-patches
2022-05-26 20:40                     ` Pedro Alves
2023-04-10 15:07                   ` Andrew Burgess via Gdb-patches
2022-05-20  7:45   ` [PATCH " Metzger, Markus T via Gdb-patches
2022-05-23 17:05     ` Lancelot SIX via Gdb-patches
2022-05-19 21:55 ` [PATCH 2/2] Introduce "info breakpoints -hide-locations" Pedro Alves
2022-05-20  6:48   ` Eli Zaretskii via Gdb-patches
2022-05-20  5:57 ` [PATCH 0/2] info breakpoints improvements Eli Zaretskii via Gdb-patches
2022-05-23 17:06   ` Pedro Alves [this message]
2022-05-24 13:14     ` Eli Zaretskii via Gdb-patches
2022-05-24 13:45       ` Pedro Alves
2022-05-24  8:38 ` Luis Machado via Gdb-patches
2022-05-24 10:02   ` Pedro Alves
2022-05-24 13:20     ` Eli Zaretskii via Gdb-patches
2022-05-24 13:29       ` Pedro Alves
2022-05-24 13:43         ` Eli Zaretskii via Gdb-patches
2022-05-24 13:50           ` Pedro Alves
2022-05-24 14:03             ` Eli Zaretskii via Gdb-patches
2022-05-24 14:09               ` Pedro Alves
2022-05-24 14:25                 ` Eli Zaretskii via Gdb-patches
2022-05-24 14:33                   ` Pedro Alves
2022-05-24 14:11               ` Andreas Schwab
2022-05-24 14:17                 ` Pedro Alves
2022-05-24 19:49                   ` [PATCH] Show enabled locations with disabled breakpoint parent as "y-" (Re: [PATCH 0/2] info breakpoints improvements) Pedro Alves
2022-05-25 13:57                     ` Eli Zaretskii via Gdb-patches
2022-05-25 19:19                       ` Pedro Alves
2022-05-24 14:26                 ` [PATCH 0/2] info breakpoints improvements Eli Zaretskii via Gdb-patches

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=869dd733-daae-ad7d-b53e-435d85d10406@palves.net \
    --to=pedro@palves.net \
    --cc=eliz@gnu.org \
    --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