<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">The breakpoint hit count is not increasing, which makes it look like we aren’t managing to do the job of stepping past the breakpoint. That requires restoring the breakpoint instruction, setting the processor to single-step, running just the thread that hit the breakpoint, then reinserting the trap.<div class=""><br class=""></div><div class="">I can’t see from the info you gave why this might be happening.</div><div class=""><br class=""></div><div class="">You can get lldb to dump the log of its stepping operations by running the command:</div><div class=""><br class=""></div><div class="">(lldb) log enable -f /tmp/lldb-step-log.txt</div><div class=""><br class=""></div><div class="">then step, then you can look at the log to see what happened. You might find this log confusing if you don’t know how lldb works but if you file a bug with the <a href="http://llvm.org" class="">llvm.org</a> bugreporter (<a href="http://bugs.llvm.org" class="">bugs.llvm.org</a>) and include this log, the output you listed below and the disassembly of the function you are trying to step past, I will take a look. </div><div class=""><br class=""></div><div class="">Jim<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 17, 2017, at 8:10 PM, Jian Liu/Gmail <<a href="mailto:ljian236@gmail.com" class="">ljian236@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">2017-11-18 3:49 GMT+08:00 Jim Ingham<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:jingham@apple.com" target="_blank" class="">jingham@apple.com</a>></span>:<br class=""><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 class=""><br class="">“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 class=""><br class=""></div><div class="">Hi Jim, Thanks for your reply. Yes, I have hit the breakpoint over and over. </div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class=""><div class="">(lldb) br list 2.1</div><div class="">2: file = 'Executor.cpp', line = 3222, exact_match = 0, locations = 1, resolved = 1, hit count = 1</div><div class=""> 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 class=""><br class=""></div><div class="">When I use "continue" to let the program to go on, lld shows:</div><div class=""><br class=""></div><div class=""><div class="">(lldb) br list 2.1</div><div class="">2: file = 'Executor.cpp', line = 3222, exact_match = 0, locations = 1, resolved = 1, hit count = 1</div><div class=""> 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 class=""><br class=""></div><div class="">(lldb) n</div><div class="">Process 6706 stopped</div><div class="">* thread #1, name = 'klee', stop reason = breakpoint 2.1 -4.1</div><div class=""> 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 class=""> 3225<span class="gmail-Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> ref<Expr> value /* undef if read */,</div><div class=""> 3226<span class="gmail-Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> KInstruction *target /* undef if write */) {</div><div class=""> 3227<span class="gmail-Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> Expr::Width type = (isWrite ? value->getWidth() : </div><div class="">-> 3228<span class="gmail-Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> getWidthForLLVMType(target->inst->getType()));</div><div class=""> 3229<span class="gmail-Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> unsigned bytes = Expr::getMinBytesForWidth(type);</div><div class=""> 3230<span class="gmail-Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> std::string name = "node";</div><div class=""> 3231<span class="gmail-Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> if (SimplifySymIndices) {</div><div class="">(lldb) </div></div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class=""><div class="">(lldb) n</div><div class="">Process 6706 stopped</div><div class="">* thread #1, name = 'klee', stop reason = breakpoint 2.1 -6.1</div><div class=""> 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 class=""> 3225<span class="gmail-Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> ref<Expr> value /* undef if read */,</div><div class=""> 3226<span class="gmail-Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> KInstruction *target /* undef if write */) {</div><div class=""> 3227<span class="gmail-Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> Expr::Width type = (isWrite ? value->getWidth() : </div><div class="">-> 3228<span class="gmail-Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> getWidthForLLVMType(target->inst->getType()));</div><div class=""> 3229<span class="gmail-Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> unsigned bytes = Expr::getMinBytesForWidth(type);</div><div class=""> 3230<span class="gmail-Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> std::string name = "node";</div><div class=""> 3231<span class="gmail-Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> if (SimplifySymIndices) {</div></div><div class=""><br class=""></div><div class="">The negative number in stop reason becomes to "-6.1". When I query internal breakpoints with the “break list -i” command, it shows.<br class=""></div><div class=""><br class=""></div><div class=""><div class="">(lldb) break list -i</div><div class="">Current breakpoints:</div><div class="">Kind: shared-library-event</div><div class="">-1: address = klee[0x00000000005361a0], locations = 1 Options: disabled one-shot </div><div class=""><br class=""></div><div class=""> -1.1: where = klee`_start, address = 0x00000000005361a0, unresolved, hit count = 1 </div><div class=""><br class=""></div><div class="">Kind: shared-library-event</div><div class="">-2: address = ld-linux-x86-64.so.2[0x0000000000011060], locations = 1, resolved = 1, hit count = 0</div><div class=""><br class=""></div><div class=""> -2.1: where = ld-linux-x86-64.so.2`_dl_debug_state, address = 0x00007ffff7de8060, resolved, hit count = 0 </div><div class=""><br class=""></div><div class="">Kind: step-out</div><div class="">-6: address = klee[0x0000000000547807], locations = 1, resolved = 1, hit count = 1 Options: enabled tid: 0x1a32 </div><div class=""> -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 class=""><br class=""></div></div><div class="">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 class=""><br class=""></div><div class="">-Jian</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""> </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 class=""><br class="">Jim<br class=""><div class=""><div class="gmail-m_-2328710898373427312h5"><br class=""><br class="">> On Nov 16, 2017, at 6:20 PM, Jian Liu/Gmail via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank" class="">lldb-dev@lists.llvm.org</a>> wrote:<br class="">><br class="">><br class="">> Dear all,<br class="">><br class="">> 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 class="">><br class="">> (lldb)<br class="">> Process 10254 stopped<br class="">> * thread #1, name = 'klee', stop reason = breakpoint 3.1 -1364.1<br class="">> frame #0: klee`klee::Executor::executeAl<wbr class="">locUnbounded(this=0x0000000001<wbr class="">278800, state=0x000000000132d710, size=4, target=0x000000000134ef00) at Executor.cpp:3036<br class="">><br class="">> 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 class="">><br class="">> I want to know what is the mean of "-1364.1" here. How to let the program to continue. Thanks.<br class="">><br class="">> ---<br class="">> Jian Liu<br class="">><br class="">><br class=""></div></div>> ______________________________<wbr class="">_________________<br class="">> lldb-dev mailing list<br class="">><span class="Apple-converted-space"> </span><a href="mailto:lldb-dev@lists.llvm.org" target="_blank" class="">lldb-dev@lists.llvm.org</a><br class="">><span class="Apple-converted-space"> </span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/lldb-dev</a><br class=""><br class=""></blockquote></div><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br clear="all" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><span style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">--<span class="Apple-converted-space"> </span></span><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail-m_-2328710898373427312gmail_signature" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr" class=""><div class="">---<div class="">Jian Liu</div><div class=""><br class=""></div><div class="">Institute of Information Engineering, Chinese Academy of Sciences.</div><div class="">Beijing China. </div></div></div></div></div></blockquote></div><br class=""></div></body></html>