Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107360: In GDB scripts, don't assume that EMACS_INT fits in long. ------------------------------------------------------------ revno: 107360 committer: Paul Eggert <eggert@xxxxxxxxxxx> branch nick: trunk timestamp: Mon 2012-02-20 16:07:53 -0800 message: In GDB scripts, don't assume that EMACS_INT fits in long. * etc/emacs-buffer.gdb ($valmask): Don't assume EMACS_INT fits in 'long'. * src/.gdbinit (xreload): Likewise. modified: etc/ChangeLog etc/emacs-buffer.gdb src/.gdbinit src/ChangeLog === modified file 'etc/ChangeLog' --- a/etc/ChangeLog 2012-02-10 15:59:29 +0000 +++ b/etc/ChangeLog 2012-02-21 00:07:53 +0000 @@ -1,3 +1,7 @@ +2012-02-20 Paul Eggert <eggert@xxxxxxxxxxx> + + * emacs-buffer.gdb ($valmask): Don't assume EMACS_INT fits in 'long'. + 2012-02-10 Leo Liu <sdl.web@xxxxxxxxx> * NEWS: Change condition-case-no-debug to === modified file 'etc/emacs-buffer.gdb' --- a/etc/emacs-buffer.gdb 2012-01-19 07:21:25 +0000 +++ b/etc/emacs-buffer.gdb 2012-02-21 00:07:53 +0000 @@ -78,7 +78,9 @@ set $yfile_buffers_only = 0 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 define ygetptr set $ptr = $arg0 === modified file 'src/.gdbinit' --- a/src/.gdbinit 2012-02-18 16:54:12 +0000 +++ b/src/.gdbinit 2012-02-21 00:07:53 +0000 @@ -1259,7 +1259,9 @@ 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 === modified file 'src/ChangeLog' --- a/src/ChangeLog 2012-02-20 23:09:58 +0000 +++ b/src/ChangeLog 2012-02-21 00:07:53 +0000 @@ -1,5 +1,8 @@ 2012-02-20 Paul Eggert <eggert@xxxxxxxxxxx> + * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long' + when computing $valmask. + Fix crash due to non-contiguous EMACS_INT (Bug#10780). * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it. (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0. _______________________________________________ Emacs-diffs mailing list Emacs-diffs@xxxxxxx https://lists.gnu.org/mailman/listinfo/emacs-diffs |