<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-11-18 3:49 GMT+08:00 Jim Ingham <span dir="ltr"><<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Negative breakpoint ID’s are used for breakpoints lldb sets for internal purposes. You can see the internal breakpoints with the “break list -i” command.<br>
<br>
“continue” doesn’t usually need to set internal breakpoints, however. And we don’t usually tell you about internal breakpoint hits, especially if you hit a user breakpoint at the same time. So that is a little curious. But I also wonder if you are hitting this breakpoint over and over? </blockquote><div><br></div><div>Hi Jim, Thanks for your reply. Yes, I have hit the breakpoint over and over. </div><div><br></div><div>I replay the same debugging process again today. This time, the break point is set as breakpoint 2 (not breakpoint 3 in my early email). When I input "break list 2.1“, lldb shows:</div><div><br></div><div><div>(lldb) br list 2.1</div><div>2: file = 'Executor.cpp', line = 3222, exact_match = 0, locations = 1, resolved = 1, hit count = 1</div><div> 2.1: where = klee`klee::Executor::executeMemoryOperation(klee::ExecutionState&, bool, klee::ref<klee::Expr>, klee::ref<klee::Expr>, klee::KInstruction*) + 39 at Executor.cpp:3228, address = 0x0000000000547807, resolved, hit count = 1 </div></div><div><br></div><div>When I use "continue" to let the program to go on, lld shows:</div><div><br></div><div><div>(lldb) br list 2.1</div><div>2: file = 'Executor.cpp', line = 3222, exact_match = 0, locations = 1, resolved = 1, hit count = 1</div><div> 2.1: where = klee`klee::Executor::executeMemoryOperation(klee::ExecutionState&, bool, klee::ref<klee::Expr>, klee::ref<klee::Expr>, klee::KInstruction*) + 39 at Executor.cpp:3228, address = 0x0000000000547807, resolved, hit count = 1 </div><div><br></div><div>(lldb) n</div><div>Process 6706 stopped</div><div>* thread #1, name = 'klee', stop reason = breakpoint 2.1 -4.1</div><div> frame #0: klee`klee::Executor::executeMemoryOperation(this=0x0000000001278800, state=0x000000000132d710, isWrite=true, address=ref<klee::Expr> @ 0x00007fffffffd480, value=ref<klee::Expr> @ 0x00007fffffffd4b0, target=0x0000000000000000) at Executor.cpp:3228</div><div> 3225<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> ref<Expr> value /* undef if read */,</div><div> 3226<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> KInstruction *target /* undef if write */) {</div><div> 3227<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> Expr::Width type = (isWrite ? value->getWidth() : </div><div>-> 3228<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> getWidthForLLVMType(target->inst->getType()));</div><div> 3229<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> unsigned bytes = Expr::getMinBytesForWidth(type);</div><div> 3230<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> std::string name = "node";</div><div> 3231<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> if (SimplifySymIndices) {</div><div>(lldb) </div></div><div><br></div><div>Obviously, the program do NOT go on. As you said, internal breakpoints were hit, because of a negative number "-4.1" in stop reason. When I input "continue" again, it shows.</div><div><br></div><div><div>(lldb) n</div><div>Process 6706 stopped</div><div>* thread #1, name = 'klee', stop reason = breakpoint 2.1 -6.1</div><div> frame #0: klee`klee::Executor::executeMemoryOperation(this=0x0000000001278800, state=0x000000000132d710, isWrite=true, address=ref<klee::Expr> @ 0x00007fffffffd480, value=ref<klee::Expr> @ 0x00007fffffffd4b0, target=0x0000000000000000) at Executor.cpp:3228</div><div> 3225<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> ref<Expr> value /* undef if read */,</div><div> 3226<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> KInstruction *target /* undef if write */) {</div><div> 3227<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> Expr::Width type = (isWrite ? value->getWidth() : </div><div>-> 3228<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> getWidthForLLVMType(target->inst->getType()));</div><div> 3229<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> unsigned bytes = Expr::getMinBytesForWidth(type);</div><div> 3230<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> std::string name = "node";</div><div> 3231<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> if (SimplifySymIndices) {</div></div><div><br></div><div>The negative number in stop reason becomes to "-6.1". When I query internal breakpoints with the “break list -i” command, it shows.<br></div><div><br></div><div><div>(lldb) break list -i</div><div>Current breakpoints:</div><div>Kind: shared-library-event</div><div>-1: address = klee[0x00000000005361a0], locations = 1 Options: disabled one-shot </div><div><br></div><div> -1.1: where = klee`_start, address = 0x00000000005361a0, unresolved, hit count = 1 </div><div><br></div><div>Kind: shared-library-event</div><div>-2: address = ld-linux-x86-64.so.2[0x0000000000011060], locations = 1, resolved = 1, hit count = 0</div><div><br></div><div> -2.1: where = ld-linux-x86-64.so.2`_dl_debug_state, address = 0x00007ffff7de8060, resolved, hit count = 0 </div><div><br></div><div>Kind: step-out</div><div>-6: address = klee[0x0000000000547807], locations = 1, resolved = 1, hit count = 1 Options: enabled tid: 0x1a32 </div><div> -6.1: where = klee`klee::Executor::executeMemoryOperation(klee::ExecutionState&, bool, klee::ref<klee::Expr>, klee::ref<klee::Expr>, klee::KInstruction*) + 39 at Executor.cpp:3228, address = 0x0000000000547807, resolved, hit count = 1 </div><div><br></div></div><div>I can not understand outputs from "break list -i” command. I wonder how to let the program to go on. BTW, I use lldb-4.0 in Ubuntu 16.04 AMD64.</div><div><br></div><div>-Jian</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"> What is the hit count on breakpoint 3? You can see this in the output of “break list 3.1"<br>
<br>
Jim<br>
<div><div class="gmail-m_-2328710898373427312h5"><br>
<br>
> On Nov 16, 2017, at 6:20 PM, Jian Liu/Gmail via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br>
><br>
><br>
> Dear all,<br>
><br>
> I have just debug KLEE with lldb. A breakpoint was set on the function "executeAllocUnbounded". After the breakpoint was hiited, I used "continue" to let the program to go on. However, it did not work. The respose from lldb is following:<br>
><br>
> (lldb)<br>
> Process 10254 stopped<br>
> * thread #1, name = 'klee', stop reason = breakpoint 3.1 -1364.1<br>
> frame #0: klee`klee::Executor::executeAl<wbr>locUnbounded(this=0x0000000001<wbr>278800, state=0x000000000132d710, size=4, target=0x000000000134ef00) at Executor.cpp:3036<br>
><br>
> NOTE that, there is a negative number "-1364.1" showed in stop reason. When I hit "continue" again, the number was change to "-1366.1", by mius -2<br>
><br>
> I want to know what is the mean of "-1364.1" here. How to let the program to continue. Thanks.<br>
><br>
> ---<br>
> Jian Liu<br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> lldb-dev mailing list<br>
> <a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/lldb-dev</a><br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_-2328710898373427312gmail_signature"><div dir="ltr"><div>---<div>Jian Liu</div><div><br></div><div>Institute of Information Engineering, Chinese Academy of Sciences.</div><div>Beijing China. </div></div></div></div>
</div></div>