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 13:27:22 +0200
[Message part 1 (text/plain, inline)]

> On 2022-07-11,, at 12:56 , Robert Pluim <rpluim <at> gmail.com> wrote:
> 
> But if I 'command script import emacs_lldb' in my llvm lldb, I get no
> errors. Maybe itʼs a version 14 thing.

Looks like it is.

> I donʼt think itʼs a big deal, and lldb version dependent checks will
> invariably be out of date. Maybe just stick in a comment?

This seems to work for me with Apple's LLDB and the one from LLVM:

def define_command (debugger, function):
    lldb_command = function.__name__
    python_function = __name__ + "." + function.__name__
    interpreter = debugger.GetCommandInterpreter()
    def define(overwrite):
        res = lldb.SBCommandReturnObject()
        interpreter.HandleCommand(f"command script add "
                                  f"{overwrite} "
                                  f"--function {python_function} "
                                  f"{lldb_command}",
                                  res)
        return res.Succeeded()
    if not define("--overwrite"):
        define("")

Could you please try it with your LLDBs?

It relies on runtime-availability of the '--overwrite', only.

[signature.asc (application/pgp-signature, attachment)]

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.