From a37166eb80458e87880893e7b8aa98a2a7ce394b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 26 May 2018 17:32:56 -0700 Subject: [PATCH] Port .gdbinit to unsigned-pointer platforms MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * 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. --- src/.gdbinit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/.gdbinit b/src/.gdbinit index eb4d57a5fbb..7a0cf02ea13 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -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) -- 2.39.5