GNU bug report logs -
#56495
29.0.50; Support for debugging Emacs with LLDB
Previous Next
Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Date: Mon, 11 Jul 2022 08:14:02 UTC
Severity: wishlist
Tags: patch
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 56495 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Mon, 11 Jul 2022 10:13:35 +0200, Gerd Möllmann <gerd.moellmann <at> gmail.com> said:
Gerd> My system, macOS with Apple M1 chip, is currently not supported by GDB.
Gerd> To quote gdb-devel, "lldb is the way to go" to debug Emacs for me.
Gerd> Attached patch adds rather limited support for that. Limited by
Gerd> - the fact that I don't know LLDB,
Gerd> - that I don't know LLDB's Python API,
Gerd> - that I'm not a Python programmer,
Gerd> - that the Python API documentation is pretty lacking in itself,
Gerd> - that I didn't implement support for ENABLE_CHECKING and what else
Gerd> might change Lisp_Object layout
Gerd> So please bear with me.
Itʼs better than what we have now, so thanks
Gerd> Anyway, at least displaying some Lisp_Objects with 'p obj' seems to
Gerd> work, and 'xbacktrace' seems to be working.
Gerd> YMMV.
Iʼve got:
lldb -v
lldb-1300.0.42.3
Swift version 5.5.2-dev
(this is an Intel macbook, not an M1)
Iʼm getting this:
lldb emacs
error: unknown or ambiguous option
error: unknown or ambiguous option
Emacs debugging support has been installed.
(lldb) target create "emacs"
Current executable set to ʼ/Users/rpluim/repos/emacs/src/emacsʼ
(x86_64).
which I can fix by doing this:
diff --git a/etc/emacs_lldb.py b/etc/emacs_lldb.py
index 3a9f17e020..ebf14d44c2 100644
--- a/etc/emacs_lldb.py
+++ b/etc/emacs_lldb.py
@@ -144,7 +144,6 @@ def define_command (debugger, function):
lldb_command = function.__name__
python_function = __name__ + "." + function.__name__
debugger.HandleCommand(f"command script add "
- f"--overwrite "
f"--function {python_function} "
f"{lldb_command}")
Robert
--
This bug report was last modified 2 years and 318 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.