From: Robert Pluim <rpluim@gmail.com>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: 56495@debbugs.gnu.org
Subject: bug#56495: 29.0.50; Support for debugging Emacs with LLDB
Date: Mon, 11 Jul 2022 11:18:23 +0200 [thread overview]
Message-ID: <877d4kgg80.fsf@gmail.com> (raw)
In-Reply-To: <AAB63EE4-18DD-40D7-A64E-DEB6729B60B3@gmail.com> ("Gerd Möllmann"'s message of "Mon, 11 Jul 2022 10:13:35 +0200")
>>>>> On Mon, 11 Jul 2022 10:13:35 +0200, Gerd Möllmann <gerd.moellmann@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
--
next prev parent reply other threads:[~2022-07-11 9:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 8:13 bug#56495: 29.0.50; Support for debugging Emacs with LLDB Gerd Möllmann
2022-07-11 9:18 ` Robert Pluim [this message]
2022-07-11 10:42 ` Gerd Möllmann
2022-07-11 10:56 ` Robert Pluim
2022-07-11 11:27 ` Gerd Möllmann
2022-07-11 12:28 ` Robert Pluim
2022-09-05 19:16 ` Lars Ingebrigtsen
2022-07-11 11:19 ` Eli Zaretskii
2022-07-11 11:31 ` Gerd Möllmann
2022-07-12 3:04 ` Richard Stallman
2022-07-12 3:15 ` Stefan Kangas
2022-07-14 3:10 ` Richard Stallman
2022-07-12 8:04 ` Gerd Möllmann
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=877d4kgg80.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=56495@debbugs.gnu.org \
--cc=gerd.moellmann@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 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).