GNU bug report logs -
#38748
28.0.50; crash on MacOS 10.15.2
Previous Next
Reported by: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Date: Thu, 26 Dec 2019 09:49:01 UTC
Severity: normal
Merged with 38822
Found in versions 27.0.60, 28.0.50
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
> Cc: alan <at> idiocy.org, 38748 <at> debbugs.gnu.org
> Date: Sun, 29 Dec 2019 21:01:42 +0200
>
> I can print the 'last_marked_index':
>
> (gdb) p last_marked_index
> $2 = 41
>
> But what can I do with 'last_marked'?
>
> (gdb) p last_marked[40]
> 'last_marked' has unknown type; cast it to its declared type
last_marked is an array of Lisp objects, arranged in circular order,
i.e. when the index reaches the last element, it is reset back to
zero.
To print the object at last_marked[i], for some i, you do
(gdb) p last_marked[i]
(gdb) xtype
The xtype command will tell you the type of the Lisp object. You then
display it with the corresponding xTYPE command: xint for an integer,
xcons for a cons cell, xstring for a string, xvector for a vector,
xbuffer for a buffer, etc. Here's a short example:
(gdb) p last_marked_index
$2 = 1
(gdb) p last_marked[0]
$3 = XIL(0x8000000006287630)
(gdb) xtype
Lisp_String
(gdb) xstring
$4 = (struct Lisp_String *) 0x6287630
" *buffer-defaults*"
So in this example, the last marked object was a Lisp string whose
contents is " *buffer-defaults*". GDB stores its C definition in
history slot $4, so we can look at its details:
(gdb) p *$4
$5 = {
u = {
s = {
size = 18,
size_byte = -2,
intervals = 0x0,
data = 0x19a1dea <DEFAULT_REHASH_SIZE+14054> " *buffer-defaults*"
},
next = 0x12,
gcaligned = 18 '\022'
}
}
All of those commands are in src/.gdbinit; if GDB says it doesn't know
these commands, tell it to read that file:
(gdb) source /path/to/emacs/src/.gdbinit
If last_marked_index is 41, you should print the objects starting from
last_marked[40], going back (39, 38, 37, etc.), trying to find the
object that is corrupted (e.g., the corresponding xTYPE command will
error out trying to display it).
This bug report was last modified 4 years and 301 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.