]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: handle unlimited screen width case in print_gdb_hints
authorPatrick Monnerat <patrick@monnerat.net>
Sat, 29 Nov 2025 14:48:55 +0000 (15:48 +0100)
committerPatrick Monnerat <patrick@monnerat.net>
Thu, 4 Dec 2025 13:22:00 +0000 (14:22 +0100)
commit06e470d8fc0ae0e83fe0977fdf8c011998980891
treef740a6350fbaf112900fd5ed80236c5365d884e7
parenta5818f278a3569f4f6ac6b6f703b9778f9a155a3
gdb: handle unlimited screen width case in print_gdb_hints

This avoids a crash when this function is called while screen width is
unlimited. In such a case (unconditionally occurring in insight), WIDTH
is returned as a negative signed integer, so it has to be compared to
another signed integer, not a size_t.

Also remove an unused WIDTH-sized variable that may fail in the above
case.
gdb/top.c