GNU bug report logs - #56495
29.0.50; Support for debugging Emacs with LLDB

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 56495 <at> debbugs.gnu.org
Subject: bug#56495: 29.0.50; Support for debugging Emacs with LLDB
Date: Mon, 11 Jul 2022 12:42:04 +0200
[Message part 1 (text/plain, inline)]

> On 2022-07-11,, at 11:18 , Robert Pluim <rpluim <at> gmail.com> wrote:
> 
>>>>>> On Mon, 11 Jul 2022 10:13:35 +0200, Gerd Möllmann <gerd.moellmann <at> gmail.com> said:
> Iʼve got:
>    lldb -v
>    lldb-1300.0.42.3
>    Swift version 5.5.2-dev

Thanks.

Looks like Apple's LLDB from the Xcode command-line tools.

Mine says "lldb version 14.0.6", and comes from "brew install llvm".  (Which I need for 'llvm-vscode', which I need for 'dap-mode', which I need for debugging with LLDB inside of Emacs, which is because of <known long story here>, and <another, shorter story here>).

I need '--overwrite' because it allows me to reload the code in a running LLDB.  Apple's LLDB seems to '--overwrite' by default, while mine gives an error:

  cannot add command: user command exists and force replace not set

\o/

Maybe I can somehow pythonese if '--overwrite' is supported or not.


> (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
> --

[Message part 2 (text/html, inline)]
[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 2 years and 319 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.