[PATCH][gdb/c] Fix printing -2147483648
Tom de Vries
tdevries@suse.de
Mon May 23 11:14:19 GMT 2022
On 5/18/22 21:00, Andreas Schwab wrote:
> On Mai 18 2022, Tom de Vries via Gdb-patches wrote:
>
>> +static bool
>> +fits_in_type (int n_sign, ULONGEST n, int type_bits, bool type_signed_p)
>
> n_sign is always 1, you can just remove it.
>
I ended up using this function here (
https://sourceware.org/pipermail/gdb-patches/2022-May/189313.html ) with
n_sign also being -1.
>> + if (have_int && have_signed && fits_in_type (1, n, int_bits, 1))
>
> type_signed_p is a bool, so you should use true and false.
>
Ack, fixed in resubmission here (
https://sourceware.org/pipermail/gdb-patches/2022-May/189311.html ).
Thanks,
- Tom
More information about the Gdb-patches
mailing list