lldb-mi support for GNU emacs

Hi,

Reposting this message, because I never received a response.

On the emacs-devel mailing list the question was raised to add support
the emacs for lldb.
Someone replied stating lldb does support MI, and emacs also support MI,
so this should work out-of-the-box.

So I took a moment to try it out. I started lldb like this:

   lldb-mi --interpreter=mi hello

(btw, `hello` is written in swift)

The program loaded successfully, and I also was able to set a
breakpoint. Then I tried to run the program and I got the following
errors:

   Command: -exec-run
   Driver. Received command '5-file-list-exec-source-files'. It was not
   handled. Command 'file-list-exec-source-files' not in Command Factory
   Driver. Received command '6-file-list-exec-source-file'. It was not
   handled. Command 'file-list-exec-source-file' not in Command Factory
   Command 'stack-info-frame'. Invalid process during debug session
   Driver. Received command '10-break-list'. It was not handled. Command 'break-list' not in Command Factory
   Driver. Received command '12-break-list'. It was not handled. Command 'break-list' not in Command Factory
   Driver. Received command '14-break-list'. It was not handled. Command 'break-list' not in Command Factory
   Driver. Received command '16-break-list'. It was not handled. Command 'break-list' not in Command Factory
   Driver. Received command '18-break-list'. It was not handled. Command 'break-list' not in Command Factory

So am I doing something wrong? Or is emacs invoking commands that are
(not yet) supported my lldb-mi?

You can read the discussion on the emacs-devel mailing list here:
http://lists.gnu.org/archive/html/emacs-devel/2016-11/msg00206.html

Kind regards,
Toon

Hi,

I’d try the lldb-dev mailing list instead of the LLVM one.

Best,

As Mehdi said, the LLDB mailing list is the better place to ask this question.

The subset of MI commands that lldb-mi currently understands is very narrow and was added to support one specific consumer (I think it might have been Eclipse, but I could be misremembering). In any case, it looks like lldb-mi is missing the implementation for certain MI commands that Emacs is expecting. Adding these shouldn't be too much work if you're building on top of the LLDB scripting API.

-- adrian