unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29957: 27.0.50; xgettype (and friends) don't know about Lisp_Word
@ 2018-01-03  4:21 Stefan Monnier
  2018-01-03  6:40 ` Paul Eggert
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2018-01-03  4:21 UTC (permalink / raw)
  To: 29957

Package: Emacs
Version: 27.0.50


    % cd .../emacs/src
    % gdb emacs
    (gdb) b main
    (gdb) r
    (gdb) xgettype Qnil

Tells me "Argument to arithmetic operation not a number or boolean."
`xbacktrace` says the same.

This seems to be due to the recent change to the representation of
List_Object.


        Stefan





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#29957: 27.0.50; xgettype (and friends) don't know about Lisp_Word
  2018-01-03  4:21 bug#29957: 27.0.50; xgettype (and friends) don't know about Lisp_Word Stefan Monnier
@ 2018-01-03  6:40 ` Paul Eggert
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2018-01-03  6:40 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 29957-done

[-- Attachment #1: Type: text/plain, Size: 53 bytes --]

Thanks for reporting that; I installed the attached.

[-- Attachment #2: 0001-Fix-.gdbinit-to-work-with-Lisp_Word.patch --]
[-- Type: text/x-patch, Size: 1323 bytes --]

From f8b4e87d5d4f57954b50677add76ce5136211dc1 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
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 de35ef1..a5411e6 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.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-03  6:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-03  4:21 bug#29957: 27.0.50; xgettype (and friends) don't know about Lisp_Word Stefan Monnier
2018-01-03  6:40 ` Paul Eggert

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).