<div dir="ltr"><div>To show that the LLDB/MI commands can be handled by the GDB plugin I am attaching a few  screen shots which will show the commands being given and the output being returned<br><br>1.When the breakpoint is hit<br></div><div>2. Step-in<br></div><div>3.Continue <br><br></div><div>I accept that  variables and stack don't update right now but  since the output being returned is almost similar to what GDB/MI  returns<br></div><div>it won't be that difficult to make them working with the existing code<br><br></div><div>The thing is according to the approach that I mentioned in the last mail ,I would be required to change the code  of debugsession.cpp ,gdbconfigpage.cpp and other files that start GDB and then  move on to the  files responsible for handling the output .<br><br></div><div>I think the attached screen shots will give a good proof that LLDB/MI and GDB/MI are compatible.<br><br></div><div>I am more than willing to work on this project.<br><br></div><div>Hoping for some feedback :)<br><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 13, 2016 at 7:10 PM, RISHABH GUPTA <span dir="ltr"><<a href="mailto:rishabh9511@gmail.com" target="_blank">rishabh9511@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hello all,<br><br></div><br></div>I have already started working on Integrating the plugin and have uploaded my work  here <a href="https://github.com/rish9511/kdevelop/tree/lldbtest" target="_blank">https://github.com/rish9511/kdevelop/tree/lldbtest</a> .<br></div><br></div>The approach I followed while working is going to result in a lot of code duplication which is not good.<br><br></div><b>New approach:</b><br></div><br><div><div><div>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.<br><br></div><div><b>LLDB/MI and GDB/MI compatibility:</b><br></div><div><br>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  <a href="https://www.codeplay.com/portal/lldb-mi-driver---part-2-setting-up-the-driver" target="_blank">https://www.codeplay.com/portal/lldb-mi-driver---part-2-setting-up-the-driver</a><br>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.<br><a href="https://github.com/llvm-mirror/lldb/blob/7535162178eada833e72a5525fc26dcc04e7331e/tools/lldb-mi/MICmdCommands.cpp" target="_blank">https://github.com/llvm-mirror/lldb/blob/7535162178eada833e72a5525fc26dcc04e7331e/tools/lldb-mi/MICmdCommands.cpp</a>  lists all the MI command that have been implemented.<br></div><div><br>So updating variables ,stack won't be an issue at all .<br><br></div><div><b>Commands that have not been implemented:</b><br>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 .<br><br></div><div>1. n = -exec-next<br></div><div>2. step = -exec-step <br></div><div>3 . continue = -exec-continue<br></div><div>4. b main.cpp:line_no = -break-insert --option "file name"<br><br></div><div>couldn't find a command for "list".<br></div><div>So if the user gives any of the non-MI command we can conditionalize and give the corresponding command.<br><br>I also had a discussion with Vladimir Prus(one of the authors of GDB plugin) ,he said it's mostly the same plugin .<br><br><br></div><div>Thank you :)<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Rishabh Gupta<br></div><div><br><br></div></font></span></div></div></div>
</blockquote></div><br></div>