Search code examples
lldb

How to list source code when there are both declaration and definition in LLDB?


I have some problems about source code list when there are both class/function declaration and definition. I want to go to definition, however, it always goes to declaration. What can I do for this?

Thanks!


Solution

  • If the problem is that:

    (lldb) source list -n functionName
    

    lists the declaration not the definition, that's a known bug.

    One way to work around it is to set a breakpoint on the name, and then use the breakpoint listing to get the file & line number. That's pretty gross but does work...