diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-10-23 02:43:16 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-10-23 02:43:16 -0700 |
commit | f39141b786525700c2619e5731c166e294265888 (patch) | |
tree | 3f053ef7e867308aa9f41315eed9163b28e5562e /etc/emacs-buffer.gdb | |
parent | 241ae7a151c0cc8c09ab82d096a8b68eae16133a (diff) | |
parent | 2deb20c1bdef2940629dc2c586d9176b9ea7e203 (diff) | |
download | emacs-f39141b786525700c2619e5731c166e294265888.tar.gz emacs-f39141b786525700c2619e5731c166e294265888.tar.bz2 emacs-f39141b786525700c2619e5731c166e294265888.zip |
Merge from origin/emacs-25
2deb20c Port last_marked change to full-program optimizers
27eb668 Adapt GDB scripts to '--enable-check-lisp-object-type' builds
dac64e3 Avoid optimizing out the last_marked[] array
Diffstat (limited to 'etc/emacs-buffer.gdb')
-rw-r--r-- | etc/emacs-buffer.gdb | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/etc/emacs-buffer.gdb b/etc/emacs-buffer.gdb index 7102dc6012b..61b06f23b2c 100644 --- a/etc/emacs-buffer.gdb +++ b/etc/emacs-buffer.gdb @@ -70,8 +70,10 @@ # Code: -# Force loading of symbols, enough to give us VALMASK etc. -set main +# Force loading of symbols, enough to give us VALBITS etc. +set $dummy = main + 8 +# With some compilers, we need this to give us struct Lisp_Symbol etc.: +set $dummy = Fmake_symbol + 8 # When nonzero, display some extra diagnostics in various commands set $yverbose = 1 @@ -82,6 +84,11 @@ define ygetptr set $ptr = (CHECK_LISP_OBJECT_TYPE ? $ptr.i : $ptr) & VALMASK end +# Get the value of Qnil for comparison. Needed when +# CHECK_LISP_OBJECT_TYPE is non-zero. +ygetptr Qnil +set $qnil = $ptr + define ybuffer-list set $files_only = $yfile_buffers_only set $yfile_buffers_only = 0 @@ -93,10 +100,13 @@ define ybuffer-list set $i = 0 set $alist = Vbuffer_alist - while $alist != Qnil - ygetptr $alist + ygetptr $alist + set $alist = $ptr + while $alist != $qnil set $this = ((struct Lisp_Cons *) $ptr)->car set $alist = ((struct Lisp_Cons *) $ptr)->u.cdr + ygetptr $alist + set $alist = $ptr # Vbuffer_alist elts are pairs of the form (name . buffer) ygetptr $this @@ -104,7 +114,9 @@ define ybuffer-list ygetptr $buf set $buf = (struct buffer *) $ptr - if ! ($files_only && $buf->filename_ == Qnil) + ygetptr $buf->filename_ + set $fname = $ptr + if ! ($files_only && $fname == $qnil) ygetptr $buf->name_ set $name = ((struct Lisp_String *) $ptr)->data set $modp = ($buf->text->modiff > $buf->text->save_modiff) ? '*' : ' ' @@ -112,11 +124,11 @@ define ybuffer-list ygetptr $buf->mode_name_ set $mode = ((struct Lisp_String *) $ptr)->data - if $buf->filename_ != Qnil + if $fname != $qnil ygetptr $buf->filename_ printf "%2d %c %9d %-20s %-10s %s\n", \ $i, $modp, ($buf->text->z_byte - 1), $name, $mode, \ - ((struct Lisp_String *) $ptr)->data + ((struct Lisp_String *) $fname)->data else printf "%2d %c %9d %-20s %-10s\n", \ $i, $modp, ($buf->text->z_byte - 1), $name, $mode @@ -146,15 +158,17 @@ define yset-buffer set $i = $arg0 set $alist = Vbuffer_alist - while ($alist != Qnil && $i > 0) - ygetptr $alist + ygetptr $alist + set $alist = $ptr + while ($alist != $qnil && $i > 0) set $alist = ((struct Lisp_Cons *) $ptr)->u.cdr + ygetptr $alist + set $alist = $ptr set $i-- end # Get car of alist; this is a pair (name . buffer) - ygetptr $alist - set $this = ((struct Lisp_Cons *) $ptr)->car + set $this = ((struct Lisp_Cons *) $alist)->car # Get the buffer object ygetptr $this |