[lldb-dev] a GUI frontend of LLDB

jingham at apple.com jingham at apple.com
Tue Feb 17 11:29:24 PST 2015


> On Feb 16, 2015, at 11:01 PM, zephyr zhao <zephyr.git at gmail.com> wrote:
> 
> Hi,
> 
> I'm working on a GUI frontend of LLDB which is based on Python 2.7 and Qt 4:
> https://github.com/c0deforfun/LLL
> 
> Screenshot of current status:
> https://raw.githubusercontent.com/c0deforfun/LLL/master/docs/screenshot.png
> 
> There're still a lot of works to do. It would be really helpful if someone could join the project.
> Any suggestions or comments will be appreciated too!
> 
> Btw, I have a question:
> when users set a breakpoint at some line, SBBreakpointLocation may return a different line No. My current workaround is grep it from SBBreakpoint.GetDescription()

This can happen when a breakpoint is set on a line that doesn't generate any code.  Then the breakpoint will be moved to the nearest line afterwards that does generate code.  For instance, setting a breakpoint on some code that is in a:

#if 0

#endif

block will cause it to be moved to the line after the #if 0'ed code.  If it is happening for you in code that looks like it is actually getting executed however, then that's a bug (most likely a bug in the line table information, but it could be an lldb bug as well.)

You don't need to grep GetDescription for the line number, however.  Just get the Location's SBAddress, (SBBreakpointLocation::GetAddress(), then get the SBSymbolContext from the address (SBAddress::GetSymbolContext(lldb.eSymbolContextEverything)).  The symbol context has a SBLineEntry (SBSymbolContext::GetLineEntry()) and that has the file spec & line number.

Jim


> 
> Thanks,
> C0deforfun
> 
> 
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev





More information about the lldb-dev mailing list