<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body class="" style="word-wrap:break-word" fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Sorry for the delay, I revisited the issue today.
<div><br>
</div>
<div>It is causing a problem for our architecture which does not support <span style="font-size: 13.3333px;">single
</span><span style="font-size: 10pt;">instruction stepping. </span><span style="font-size: 10pt;">We emulate it with breakpoints and a processor exception on branch taken.</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">For example:</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">When we step over a line with a breakpoint, our flavor of StepOverRange inserts a breakpoint at the next likely instruction and enables processor branch exception. </span><span style="font-size: 10pt;">LLDB will queue StepOverRange
 and StepOverBreakpoint plans.</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">The problem occurs when we stop on the breakpoint inserted by StepOverRange. </span><span style="font-size: 10pt;">ThreadPlanStepOverBreakpoint::DoPlanExplainsStop will see the </span><span style="font-size: 10pt;">stop reason
 is </span><span style="font-size: 10pt;">eStopReasonBreakpoint and ignore the breakpoint. Then </span><span style="font-size: 13.3333px;">StepOverRange's </span><span style="font-size: 13.3333px;">DoPlanExplainsStop</span><span style="font-size: 13.3333px;"> will
 claim it and </span><span style="font-size: 13.3333px;">ThreadPlanStepOverBreakpoint gets discarded and does not reinsert the original breakpoint.</span></div>
<div><br>
</div>
<div>Is there a way to make our scenario fit in the default thread plans?</div>
<div>Maybe check the breakpoint kind <span style="font-size: 13.3333px;">of all 'step' breakpoints </span><span style="font-size: 10pt;">and set the thread's StopReason to Trace?</span></div>
<div><br>
</div>
<div>-Philippe</div>
<div><br>
</div>
<div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF444727" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> jingham@apple.com [jingham@apple.com]<br>
<b>Sent:</b> Monday, October 05, 2015 5:26 PM<br>
<b>To:</b> Philippe Lavoie<br>
<b>Cc:</b> lldb-dev@lists.llvm.org<br>
<b>Subject:</b> Re: [lldb-dev] ThreadPlanStepOverBreakpoint behavior<br>
</font><br>
</div>
<div></div>
<div>That is intended behavior.  MischiefManaged is called when an stop propagates to that plan, and it needs to decide whether it is done or not.  That’s not what happens when somebody decides to discard the plan.  WillPop will get called if you need to do
 some cleanup when the plan gets popped.
<div class=""><br class="">
</div>
<div class="">Was this causing some problem?</div>
<div class=""><br class="">
</div>
<div class="">Jim</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Sep 25, 2015, at 1:51 PM, Philippe Lavoie via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="" style="font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px; direction:ltr; font-family:Tahoma; font-size:10pt">
<div class=""><br class="Apple-interchange-newline">
I noticed that when a ThreadPlanStepOverBreakpoint is discarded (as opposed to being popped from the stack), MischiefManaged() is not called and the disabled breakpoint is not re-enabled.</div>
<div class=""><br class="">
</div>
<div class="">Is this the intended behavior ?</div>
<div class=""><br class="">
</div>
<div class="">-Philippe</div>
</div>
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px; float:none; display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px; float:none; display:inline!important">lldb-dev
 mailing list</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">
<a href="mailto:lldb-dev@lists.llvm.org" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px" target="_blank">lldb-dev@lists.llvm.org</a><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</div>
</body>
</html>