<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">i have been investigating several lldb bugs that seem to be related.  <div><br></div><div>bug 19974 describes lldb's inability to set a breakpoint in an included file and bug 20297 describes lldb's inability to set a breakpoint when using ccache.  i have also found a similar case where lldb is unable to set a breakpoint when a separate preprocess step has been used before compiling.</div><div><br></div><div>note: ccache uses a preprocess step to determine which source files need to be rebuilt so using ccache could be considered the same as using a separate preprocess step.</div><div><br></div><div>all three cases are similar in that the c/c++ preprocessor is involved and alters the way symbols are added to the object files.</div><div><br></div><div>the following attached files are write-ups of some of my findings for the different cases</div><div>    ccache - "lldb and ccache.rtf"</div><div>    preprocessed files - "lldb and preprocessed files.rtf"</div><div>    include files - "lldb and include files.rtf"</div><div><br></div><div>all three cases generate the inability to set breakpoints</div><div><br></div><div>on the Mac, all three cases create object files with "SOL" symbols for preprocessed or included source files.</div><div><br></div><div>the following attached file describes the object files created for the preprocessed test case on the Mac:</div><div>    "preprocessed object files.rtf"</div><div><br></div><div>on ubuntu, it is not as obvious to spot differences in the object files when examining object files that that lldb is unable to set breakpoints.</div><div> </div><div>lldb is unable to set breakpoints on both OSX and ubuntu for all three cases.   gdb is able to set breakpoints on both OSX and ubuntu for all three cases.</div><div><br></div><div><span style="font-size:13px;font-family:arial,sans-serif">using</span><span style="font-size:13px;font-family:arial,sans-serif"> XCode, i have tried a couple different ways of stepping through lldb to see why it is having trouble setting breakpoints</span>.  </div><div><br></div><div>From top-down, i have traced setting breakpoints in Breakpoint.cpp down thru BreakpointResolver.cpp.  The intended source file does not seem to be in the list of compute units, but i don't know why.</div><div><br></div><div>From bottom-up, i have tried to follow how ObjectFileMachO.cpp parses symbols, but i'm not sure that this is the correct place to look.  Also, since this is both a MachO problem and an Elf problem, the problem isn't likely to be here anyway.</div><div><br></div><div>Does anyone familiar with lldb's architecture have any ideas where in the code i should be looking or have a plan-of-attack to suggest?</div><div><br></div><div>thanks,</div><div>doug</div><div><br></div><div><br></div></div>
</div><br></div>
</div><br></div>