Approach for Integrating LLDB Plugin

RISHABH GUPTA rishabh9511 at gmail.com
Sun Mar 13 13:40:37 UTC 2016


Hello all,


I have already started working on Integrating the plugin and have uploaded
my work  here https://github.com/rish9511/kdevelop/tree/lldbtest .

The approach I followed while working is going to result in a lot of code
duplication which is not good.

*New approach:*

Most of the classes like DebugSession,DebuggerPlugin ,DebugJob, etc are
going to be  re-used in both the plugins so it's better to make  changes in
the existing code and then make  GDB and LLDB use  them.

*LLDB/MI and GDB/MI compatibility:*

They  both are compatible.Any IDE that supports the GDB/MI protocol should
be able to use the MI driver .This has been mentioned  on codeplay's site
https://www.codeplay.com/portal/lldb-mi-driver---part-2-setting-up-the-driver
I cross checked this after Kevin Funk suggested me to see if the commands
sent by GDB plugin work with lldb-mi or not.Most of the commands worked
like a charm.
https://github.com/llvm-mirror/lldb/blob/7535162178eada833e72a5525fc26dcc04e7331e/tools/lldb-mi/MICmdCommands.cpp
lists all the MI command that have been implemented.

So updating variables ,stack won't be an issue at all .

*Commands that have not been implemented:*
The non MI commands like "n" ,"list","step","continue" ,"b main.cp:7" ,etc
have not been implemented but for most of them corresponding commands exist
.

1. n = -exec-next
2. step = -exec-step
3 . continue = -exec-continue
4. b main.cpp:line_no = -break-insert --option "file name"

couldn't find a command for "list".
So if the user gives any of the non-MI command we can conditionalize and
give the corresponding command.

I also had a discussion with Vladimir Prus(one of the authors of GDB
plugin) ,he said it's mostly the same plugin .


Thank you :)
Rishabh Gupta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160313/644a590a/attachment.html>


More information about the KDevelop-devel mailing list