]> git.eshelyaron.com Git - emacs.git/commitdiff
Pretty-print const Lisp_Objects in .gdbinit
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 6 May 2017 21:24:12 +0000 (14:24 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 6 May 2017 21:25:13 +0000 (14:25 -0700)
* src/.gdbinit (Emacs_Pretty_Printers.__call__):
Compare unqualified type to Lisp_Object, to do the right thing
when the expression has type ‘Lisp_Object const’.
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00138.html

src/.gdbinit

index 0596188e05027c0fc0085d16e872efee61a30d68..29689e20a95a0961dac388aaeb7f62290a73f089 100644 (file)
@@ -1280,7 +1280,7 @@ if hasattr(gdb, 'printing'):
        RegexpCollectionPrettyPrinter except when printing Lisp_Object."""
     def __call__ (self, val):
       """Look up the pretty-printer for the provided value."""
-      type = val.type
+      type = val.type.unqualified ()
       typename = type.tag or type.name
       basic_type = gdb.types.get_basic_type (type)
       basic_typename = basic_type.tag or basic_type.name