<div dir="ltr">Hello,<div><br></div><div>lldb-mi uses public API too and it works. Try to look how it implemented there (see tools/lldb-mi/MICmdCmdBreak.cpp:232).</div><div><br></div><div>Thanks,</div><div>Ilia</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 26, 2015 at 6:31 PM, Ziming Song <span dir="ltr"><<a href="mailto:s.ziming@hotmail.com" target="_blank">s.ziming@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">Hi everyone, I'm doing a GUI frontend using lldb api, but the breakpoint created by code cannot make the program stop.<div><br></div><div>The code for creating the breakpoint is:</div><div><br></div><div>
<pre style="margin-top:0px;margin-bottom:0px"><font face="Courier New, sans-serif"><span style="color:#800080">lldb</span>::<span style="color:#800080">SBBreakpoint</span><span style="color:#c0c0c0"> </span>bp<span style="color:#c0c0c0"> </span>=<span style="color:#c0c0c0"> </span><span style="color:#800000">target_</span>.BreakpointCreateByLocation(<span style="color:#800000">target_</span>.GetExecutable().GetFilename(),<span style="color:#c0c0c0"> </span>lineNumber);</font></pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">The breakpoint is valid, and I can get its description, but the program does not stop on that breakpoint.</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">I've set the async of debugger to false, and after launching the target, the first state of the process is <font face="Courier New, sans-serif">eStateExited</font>, which means the breakpoint didn't work (even if `<font face="Courier New, sans-serif">bp.SetEnabled(true)</font>`).</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">Another question. If I'm able to make breakpoint work, how can I get notified if the line number of that breakpoint change(like when the user set breakpoint on a line which generates no code and the breakpoint moves to the closest line that generates code).</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">Thanks in advance.</pre></div> </div></div>
<br>_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
<br></blockquote></div><br></div>