[lldb-dev] Emacs LLDB support & the GDB/MI Interface
Eli Zaretskii via lldb-dev
lldb-dev at lists.llvm.org
Sat Jul 29 19:38:48 PDT 2017
> Date: Sat, 29 Jul 2017 22:43:59 +0200
> Cc: lldb-dev at lists.llvm.org
> From: Jan Kratochvil via lldb-dev <lldb-dev at lists.llvm.org>
>
> MI protocol was designed to minimize the amount of data transferred between
> gdb/lldb and a front end. But this communication isn't anything expensive as
> the debugger always runs on the same host as the frontend anyway
> (gdb/lldb<->gdbserver link is for remote debugging). Unfortunately complexity
> of the GDB/MI protocol from this misoptimization leads to many bugs on both
> sides of the implementation, for GDB:
> https://sourceware.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&component=mi&list_id=37310&product=gdb&query_format=advanced
> 101 bugs found.
>
> The MI protocol in use does not conform to its spec as there is a bug-to-bug
> compatibility instead such as:
> https://sourceware.org/ml/gdb-patches/2008-11/msg00275.html
>
> There still also isn't any reasonable MI library to be used by a front end.
Correct or not, buggy or not, the Emacs support for GDB is based on
MI, and it works reasonably well for the last few years. So much so
that Emacs developers have deprecated the previous GUD interface based
on annotations (which are also deprecated by the GDB team).
> I find the LLDB API to be a better choice to be used by the frontend/emacs
> (I have only little but great experience with the LLDB API).
Good luck with that attitude having LLDB support in Emacs any time
soon. Even supporting it via the ancient GUD, which required a couple
of minor changes, was met with some resistance. (Some think that this
resistance was overcome, but IMO the jury is still out on that one,
and we won't know the truth until an attempt to add that support is
made in earnest.)
Having LLDB support MI would solve this problem cleanly and
seamlessly. It's your call to decide whether Emacs support is
important enough to you to do that.
More information about the lldb-dev
mailing list