Port .gdbinit to unsigned-pointer platforms

* src/.gdbinit (Lisp_Object_Printer.to_string):
Don’t assume that GDB treats C pointers as signed integers.
Problem found with GDB Fedora 8.1-15.fc28.
This commit is contained in:
Paul Eggert 2018-05-26 17:32:56 -07:00
parent a73e4f53ab
commit a37166eb80

View file

@ -1355,7 +1355,7 @@ if hasattr(gdb, 'printing'):
if itype == Lisp_Int0 or itype == Lisp_Int1:
if USE_LSB_TAG:
ival = ival >> (GCTYPEBITS - 1)
elif (ival >> VALBITS) & 1:
if (ival >> VALBITS) & 1:
ival = ival | (-1 << VALBITS)
else:
ival = ival & ((1 << VALBITS) - 1)