From f31689c803a13836ef3528d6e2b4c98c767c42c7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 6 May 2017 15:29:16 -0700 Subject: [PATCH 2/2] Port .gdbinit to GDB 7.11.1 + Python 2.7.12 * src/.gdbinit (Lisp_Object_Printer.to_string): Explicitly convert integer val to 'int', so that older GDBs do not complain about the conversion. * src/lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Give the struct a tag, so that older GDB pretty-printers have a tag to hang their hat on. --- src/.gdbinit | 2 +- src/lisp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/.gdbinit b/src/.gdbinit index 29689e2..80aa95b 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -1311,7 +1311,7 @@ if hasattr(gdb, 'printing'): # pretty-printing could be fancier. if not val: return "XIL(0)" # Easier to read than "XIL(0x0)". - return "XIL(0x%x)" % val + return "XIL(0x%x)" % int(val) def build_pretty_printer (): pp = Emacs_Pretty_Printers ("Emacs") diff --git a/src/lisp.h b/src/lisp.h index 5d4c64a..de3a548 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -546,7 +546,7 @@ enum Lisp_Fwd_Type #ifdef CHECK_LISP_OBJECT_TYPE -typedef struct { EMACS_INT i; } Lisp_Object; +typedef struct Lisp_Object { EMACS_INT i; } Lisp_Object; #define LISP_INITIALLY(i) {i} -- 2.7.4