From f8b4e87d5d4f57954b50677add76ce5136211dc1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 2 Jan 2018 22:38:01 -0800 Subject: [PATCH] Fix .gdbinit to work with Lisp_Word Problem reported by Stefan Monnier (Bug#29957). * src/.gdbinit (xgetptr, xgetint, xgettype): Cast Lisp_Word value to EMACS_INT, since it might be a pointer now. --- src/.gdbinit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/.gdbinit b/src/.gdbinit index de35ef1be70..a5411e66d56 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -49,7 +49,7 @@ define xgetptr else set $bugfix = $arg0 end - set $ptr = $bugfix & VALMASK + set $ptr = (EMACS_INT) $bugfix & VALMASK end define xgetint @@ -58,7 +58,7 @@ define xgetint else set $bugfix = $arg0 end - set $int = $bugfix << (USE_LSB_TAG ? 0 : INTTYPEBITS) >> INTTYPEBITS + set $int = (EMACS_INT) $bugfix << (USE_LSB_TAG ? 0 : INTTYPEBITS) >> INTTYPEBITS end define xgettype @@ -67,7 +67,7 @@ define xgettype else set $bugfix = $arg0 end - set $type = (enum Lisp_Type) (USE_LSB_TAG ? $bugfix & (1 << GCTYPEBITS) - 1 : (EMACS_UINT) $bugfix >> VALBITS) + set $type = (enum Lisp_Type) (USE_LSB_TAG ? (EMACS_INT) $bugfix & (1 << GCTYPEBITS) - 1 : (EMACS_UINT) $bugfix >> VALBITS) end define xgetsym -- 2.39.2