]> code.delx.au - gnu-emacs/blobdiff - src/.gdbinit
Fix bug #12242 with crashes in ralloc.c on OpenBSD.
[gnu-emacs] / src / .gdbinit
index 74dbd7a4197c0300cf6aa308b34a8808df962c97..7cd828733b102a853acb038830289b6af8f35205 100644 (file)
@@ -1259,7 +1259,9 @@ end
 
 define xreload
   set $tagmask = (((long)1 << gdb_gctypebits) - 1)
-  set $valmask = gdb_use_lsb ? ~($tagmask) : ((long)1 << gdb_valbits) - 1
+  # The consing_since_gc business widens the 1 to EMACS_INT,
+  # a symbol not directly visible to GDB.
+  set $valmask = gdb_use_lsb ? ~($tagmask) : ((consing_since_gc - consing_since_gc + 1) << gdb_valbits) - 1
 end
 document xreload
   When starting Emacs a second time in the same gdb session under