The virtue of the MI interface is that it allows you to write a tool that 
supports gdb as well as lldb.  But the MI is a not an API per se, it's just a 
structured text interface.  You send text commands to the MI server, and 
receive text results which you then parse to extract the results.  

If you don't need to support gdb, you will have a much easier time of it using 
lldb's SB API's, either from Python or C++.  The SB API's are the programmatic 
interface to lldb.  We are careful to maintain binary compatibility of the 
API's across lldb release versions, so you won't have to worry about tracking 
versions.  And you won't have to deal with parsing MI text output.  The SB 
API's are how Xcode implements its debugging support, and is used in much or 
our teststuite.  So it is a quite well tested API, and as a side benefit, the 
testsuite contains lots or examples of how to use them.

See more details here:

http://lldb.llvm.org/python_reference/index.html

or

http://lldb.llvm.org/cpp_reference/html/index.html

There are also some useful Python examples that do various jobs in:

http://llvm.org/svn/llvm-project/lldb/trunk/examples/python/

Hope this helps,

Jim

> On May 26, 2017, at 3:43 AM, Laghzaoui Mohammed via lldb-commits 
> <lldb-commits@lists.llvm.org> wrote:
> 
> Hi Lists,
> I have to implement a graphical interface to open the Dump of Macos with LLDB.
> I know how to do this using the command line, but this and less productive, I 
> found that LLDB-MI little make me an interface to do this need but I did not 
> find an example of LLDB-MI in C ++ and How to build LLDB-MI.
> To detail our need:
> 1 - opening of a core dump.
> 2 -__ reading the value of a memory address.
> 3 -__ list threads and frames.
> 4 -__ get assembler of each frame.
>   
> Thank you in advance for your help.
> _______________________________________________
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to