[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30320: 26.0.91; Crash when using lsp-ui-doc-mode

From: Jake Goulding
Subject: bug#30320: 26.0.91; Crash when using lsp-ui-doc-mode
Date: Sun, 4 Feb 2018 16:08:37 -0500

> 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
    set $bugfix = $arg0.i
    set $bugfix = $arg0
  set $ptr = $bugfix & VALMASK

define xgetsym
  xgetptr $arg0
  set $ptr = ((struct Lisp_Symbol *) ((char *)lispsym + $ptr))

define xsymbol
  set $sym = $
  xgetsym $sym
  print (struct Lisp_Symbol *) $ptr
  xprintsym $sym
  echo \n

And the value of VALMASK:

(lldb) p VALMASK
(EMACS_INT) $83 = -8

reply via email to

[Prev in Thread] Current Thread [Next in Thread]