The problem is that I only placed one breakpoint, how can I have a "breakpoint site 3"? Here's my interaction with lldb:<div><div><br></div><div>➜  tests ±:(master) ! lldb ./a</div><div>Current executable set to './a' (x86_64).</div>
<div>(lldb) breakpoint set -n main</div><div>Breakpoint created: 1: name = 'main', locations = 1</div><div>(lldb) run</div><div>DynamicLoaderMacOSXDYLD::PrivateInitialize() process state = launching</div><div>DynamicLoaderMacOSXDYLD::SetNotificationBreakpoint() process state = launching</div>
<div>Process 81623 launched: '/Users/filipe/src/tests/a' (x86_64)</div><div>Process 81623 stopped</div><div>* thread #1: tid = 0x2d03, 0x0000000100000dd0 a`main + 32 at a.c:13, stop reason = breakpoint 1.1</div><div>
    frame #0: 0x0000000100000dd0 a`main + 32 at a.c:13</div><div>   10  <span class="Apple-tab-span" style="white-space:pre">        </span></div><div>   11  <span class="Apple-tab-span" style="white-space:pre">   </span>int main()</div>
<div>   12  <span class="Apple-tab-span" style="white-space:pre">    </span>{</div><div>-> 13  <span class="Apple-tab-span" style="white-space:pre"> </span>  int i = ITERS, r = 0;</div><div>   14  <span class="Apple-tab-span" style="white-space:pre">   </span>  clock_t start, end;</div>
<div>   15  <span class="Apple-tab-span" style="white-space:pre">    </span></div><div>   16  <span class="Apple-tab-span" style="white-space:pre">   </span>  r = nyan(1);</div><div>(lldb) process load ~/src/tests/libmylib.dyld</div>
<div>error: failed to load '~/src/tests/libmylib.dyld': Execution was interrupted, reason: breakpoint site 3.</div><div>The process has been returned to the state before execution.</div><div>(lldb) breakpoint list --full </div>
<div>Current breakpoints:</div><div>1: name = 'main', locations = 1, resolved = 1</div><div>  1.1: where = a`main + 32 at a.c:13, address = 0x0000000100000dd0, resolved, hit count = 1 </div><div><br></div><div><br>
</div><div>Thanks for the help,</div><div><br></div><div>  Filipe</div><br><div class="gmail_quote">On Tue, Aug 9, 2011 at 19:16, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com">gclayton@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Internal breakpoints have negative IDs, so this hit one of your breakpoints, breakpoint 3.<br>
<br>
Do a:<br>
<br>
(lldb) breakpoint list --full<br>
<br>
And see which breakpoint it is hitting.<br>
<div><div></div><div class="h5"><br>
<br>
On Aug 9, 2011, at 4:56 PM, Filipe Cabecinhas wrote:<br>
<br>
> Hi,<br>
><br>
> It seems I forgot to include the patches in this message, sorry about that. I'm sending them now, along with a patch to report errors when doing a "process load".<br>
><br>
> I am also not able to do a "process load mylib.dylib", where mylib has this table (I'm trying to redefine printf):<br>
> ➜  tests ±:(master) ! nm -m libmylib.dylib<br>
> 00000f60 (__TEXT,__text) external _printf<br>
> 00000fa0 (__TEXT,__text) non-external _strlen<br>
>          (undefined) external _write$UNIX2003 (from libSystem)<br>
>          (undefined) external dyld_stub_binder (from libSystem)<br>
><br>
> I get the error:<br>
> error: failed to load '~/src/tests/libmylib.dyld': Execution was interrupted, reason: breakpoint site 3.<br>
> The process has been returned to the state before execution.<br>
><br>
> The error is from ClangUserExpression->Evaluate(). I suppose that breakpoint site is internal (I only have placed one breakpoint site, in main()). How can I know what is going on?<br>
><br>
> Regards,<br>
><br>
>   Filipe<br>
><br>
> On Tue, Aug 2, 2011 at 11:07, Filipe Cabecinhas <<a href="mailto:filcab%2Blldb-dev@gmail.com">filcab+lldb-dev@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> Here are two small fixed:<br>
><br>
>  - Fixed ifdeffed code that only compiles when debugging with the DEBUG_STACK_FRAMES flag.<br>
>  - Makes CommandObjectThreadStepWithTypeAndScope.Execute() behave like what was described in the mailing list: If there is no selected thread, select the first one (index 0).<br>
><br>
> Regards,nbsp; Filipe<br>
><br>
><br>
</div></div>> <fix-ifdeffed-code-stackframelist.patch><get-first-thread-if-no-selected-thread.patch><ProcessLoadError.patch>_______________________________________________<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>