From: Eli Zaretskii <eliz@gnu.org>
To: Andrii Kolomoiets <andreyk.mad@gmail.com>
Cc: alan@idiocy.org, 38748@debbugs.gnu.org
Subject: bug#38748: 28.0.50; crash on MacOS 10.15.2
Date: Sun, 29 Dec 2019 21:31:17 +0200 [thread overview]
Message-ID: <83sgl3lyii.fsf@gnu.org> (raw)
In-Reply-To: <m2lfqv7y7d.fsf@gmail.com> (message from Andrii Kolomoiets on Sun, 29 Dec 2019 21:01:42 +0200)
> From: Andrii Kolomoiets <andreyk.mad@gmail.com>
> Cc: alan@idiocy.org, 38748@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).
next prev parent reply other threads:[~2019-12-29 19:31 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-26 9:47 bug#38748: 28.0.50; crash on MacOS 10.15.2 Andrii Kolomoiets
2019-12-26 13:04 ` Alan Third
2019-12-26 17:18 ` Eli Zaretskii
2019-12-27 11:28 ` Andrii Kolomoiets
2019-12-27 14:14 ` Eli Zaretskii
2019-12-29 19:01 ` Andrii Kolomoiets
2019-12-29 19:31 ` Eli Zaretskii [this message]
2020-01-01 20:42 ` Andrii Kolomoiets
2020-01-02 14:06 ` Eli Zaretskii
2020-01-08 17:39 ` Robert Pluim
2020-01-08 19:18 ` Pip Cet
2020-01-08 19:58 ` Eli Zaretskii
2020-01-08 20:39 ` Pip Cet
2020-01-09 3:30 ` Eli Zaretskii
2020-01-10 7:32 ` Pip Cet
2020-01-10 8:27 ` Eli Zaretskii
2020-01-10 8:58 ` Robert Pluim
2020-01-10 9:21 ` Eli Zaretskii
2020-01-10 10:18 ` Robert Pluim
2020-01-11 6:26 ` Pankaj Jangid
2020-01-11 8:08 ` Eli Zaretskii
2020-01-11 10:43 ` Pankaj Jangid
2020-01-11 12:14 ` Eli Zaretskii
2020-01-10 9:22 ` Pip Cet
2020-01-10 9:33 ` Eli Zaretskii
2020-01-11 13:59 ` Alan Third
2020-01-11 14:13 ` Pip Cet
2020-01-11 19:07 ` Alan Third
2020-01-08 21:43 ` Robert Pluim
2020-01-08 22:18 ` Pip Cet
2020-01-08 22:23 ` Robert Pluim
2020-01-09 7:51 ` Robert Pluim
2020-01-09 10:07 ` Eli Zaretskii
2020-01-09 10:31 ` Robert Pluim
2020-01-09 14:10 ` Pip Cet
2020-01-09 14:16 ` Eli Zaretskii
2020-01-09 14:56 ` Robert Pluim
2020-01-09 17:06 ` Eli Zaretskii
2020-01-09 13:51 ` Andrii Kolomoiets
2020-01-09 14:13 ` Robert Pluim
2020-01-09 14:16 ` Pip Cet
2020-01-09 14:29 ` Andrii Kolomoiets
2020-01-09 15:15 ` Robert Pluim
2020-01-11 18:37 ` Pieter van Oostrum
2020-01-11 18:43 ` Eli Zaretskii
2020-01-11 21:23 ` Pieter van Oostrum
2020-01-12 3:33 ` Eli Zaretskii
2020-01-11 19:14 ` Pip Cet
2020-01-11 21:36 ` Pieter van Oostrum
2020-01-04 16:48 ` Pieter van Oostrum
2020-01-04 17:25 ` Alan Third
2020-01-05 19:41 ` Pieter van Oostrum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83sgl3lyii.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=38748@debbugs.gnu.org \
--cc=alan@idiocy.org \
--cc=andreyk.mad@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.