Hi Jim, Cool! Thanks a lot! Your analysis is correct. Let me try you solution!
Thanks On Tue, Feb 17, 2015 at 11:29 AM, <jing...@apple.com> wrote: > > > On Feb 16, 2015, at 11:01 PM, zephyr zhao <zephyr....@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@cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev > >
_______________________________________________ lldb-dev mailing list lldb-dev@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev