Re: GDB BoF notes - GNU Cauldron 2023

Pedro Alves
2023-09-29T10:25:37Z

On 2023-09-28 21:44, Tom Tromey wrote:

> Some other defaults to consider:
>
> set print object on

+1. I've wondered before what was the reason for not making this the default.
Maybe because it requires reading the rtti/vtable, and that can go wrong, and
it was thought that when it fails it's confusing? Dunno. Things may be better
nowadays in the bad scenarios. At least you can do "p -o -- var" nowadays,
but I guess most people don't know about that.

> set breakpoint pending on

+1000. If you get a pending breakpoint due to a typo, you can always delete
the just-created breakpoint...

> set print pretty on
>
> The last one is iffy I guess, maybe people like the compact output. The
> first two I think I've had to tell many people about over the years.

Personally I prefer the compact output most of the times, and only occasionally
do "print -pretty" or "with print pretty".