[PATCH 0/2] info breakpoints improvements

Eli Zaretskii eliz@gnu.org
Fri May 20 05:57:31 GMT 2022


> 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.)

> 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.

Thanks.


More information about the Gdb-patches mailing list