set width: how to restore to auto

Pedro Alves
Wed Aug 23 12:14:19 GMT 2023

On 23/08/23 10:53, Aleksey Midenkov via Gdb wrote:
> To avoid line wrapping in backtrace we use:
>     set width 0
> How to restore it to auto without resizing the terminal?

I guess having "set width/height auto" would make sense.

> Why after resizing the terminal defined width is lost?

Indeed, "auto" could fix this, by making anything non-auto stick.

I suggest filing a bug report about this.

> Looks like there is not enough control over this parameter to implement two
> backtrace macros with and without line wrapping.

If it's just the one command you want to wrap, you can do:

 (gdb) alias bt0 = with width 0 -- backtrace
 (gdb) bt0 [ARG...]

More information about the Gdb mailing list