From: Jake Goulding <jake.goulding@gmail.com>
To: 30320@debbugs.gnu.org
Subject: bug#30320: 26.0.91; Crash when using lsp-ui-doc-mode
Date: Sun, 4 Feb 2018 16:08:37 -0500 [thread overview]
Message-ID: <CAEDNNqC+VODaH12Z955ua9Seaybr+hqueOyPZh8zRLRBiKD=pQ@mail.gmail.com> (raw)
In-Reply-To: <83y3k88ux5.fsf@gnu.org>
> the first
> element of the args[] array passed to Ffuncall is the symbol of the
> function that is being called. To display the name of that symbol,
> you will have to emulate by hand what the xsymbol command, defined on
> .gdbinit, does.
I cannot find a way to just use the GDB `define`d helpers in LLDB, so
it looks like I need to re-create
them. Unfortunately, I'm getting values that don't make sense; I'm
sure I'm not translating something
correctly but it's not obvious what:
(lldb) frame info
frame #36: 0x00000001002e4105 Emacs`Ffuncall(nargs=3,
args=0x00007ffeefbfb610) at eval.c:2768
(lldb) p args
(Lisp_Object *) $76 = 0x00007ffeefbfb610
(lldb) p args[0]
(Lisp_Object) $77 = 48784336
# Attempting equivalent to `xgetptr`
(lldb) p args[0] & VALMASK
(long) $78 = 48784336
# Attempting equivalent to `xgetsym`
(lldb) p ((struct Lisp_Symbol *) ((char *)lispsym + (args[0] & VALMASK)))
(struct Lisp_Symbol *) $79 = 0x0000000110340d80
(lldb) p *((struct Lisp_Symbol *) ((char *)lispsym + (args[0] & VALMASK)))
error: Couldn't apply expression side effects : Couldn't dematerialize
a result variable: couldn't read its memory
For reference, here are the GDB definitions I see in src/.gdbinit
define xgetptr
if (CHECK_LISP_OBJECT_TYPE)
set $bugfix = $arg0.i
else
set $bugfix = $arg0
end
set $ptr = $bugfix & VALMASK
end
define xgetsym
xgetptr $arg0
set $ptr = ((struct Lisp_Symbol *) ((char *)lispsym + $ptr))
end
define xsymbol
set $sym = $
xgetsym $sym
print (struct Lisp_Symbol *) $ptr
xprintsym $sym
echo \n
end
And the value of VALMASK:
(lldb) p VALMASK
(EMACS_INT) $83 = -8
next prev parent reply other threads:[~2018-02-04 21:08 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 15:10 bug#30320: 26.0.91; Crash when using lsp-ui-doc-mode Jake Goulding
2018-02-01 17:16 ` Eli Zaretskii
2018-02-01 19:52 ` Jake Goulding
2018-02-01 19:54 ` Jake Goulding
2018-02-02 8:21 ` Eli Zaretskii
2018-02-02 16:22 ` Jake Goulding
2018-02-03 9:04 ` martin rudalics
2018-02-03 16:10 ` Jake Goulding
2018-02-03 16:34 ` Eli Zaretskii
2018-02-03 19:43 ` Jake Goulding
2018-02-03 20:10 ` Eli Zaretskii
2018-02-03 21:55 ` Jake Goulding
2018-02-04 18:35 ` Eli Zaretskii
2018-02-04 21:08 ` Jake Goulding [this message]
2018-02-04 21:38 ` Jake Goulding
2018-02-05 17:03 ` Eli Zaretskii
2018-02-05 18:43 ` Jake Goulding
2018-02-05 20:14 ` Eli Zaretskii
2018-02-06 9:29 ` martin rudalics
2018-02-10 10:14 ` Eli Zaretskii
2018-02-10 10:45 ` martin rudalics
2018-02-10 12:11 ` Eli Zaretskii
2018-02-10 13:40 ` martin rudalics
2018-02-10 16:38 ` Eli Zaretskii
2018-02-11 9:36 ` martin rudalics
2018-02-11 15:43 ` Eli Zaretskii
2018-02-12 1:31 ` Jake Goulding
2018-02-12 1:33 ` Jake Goulding
2018-02-12 1:48 ` Jake Goulding
2018-02-12 9:24 ` martin rudalics
2019-10-30 11:06 ` Lars Ingebrigtsen
2018-02-12 9:22 ` martin rudalics
2018-02-12 9:22 ` martin rudalics
2018-02-12 9:22 ` martin rudalics
2018-02-12 18:04 ` Eli Zaretskii
2018-02-10 19:04 ` Jake Goulding
2018-02-02 8:27 ` martin rudalics
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEDNNqC+VODaH12Z955ua9Seaybr+hqueOyPZh8zRLRBiKD=pQ@mail.gmail.com' \
--to=jake.goulding@gmail.com \
--cc=30320@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).