source list at execution pointer

Is there a command to tell LLDB to list source at the current execution pointer?

I suppose I can always list at the line number, but after listing a couple of times, its easy to get a bit lost and lose that line number.



lldb does this the same way gdb does:

(lldb) f 0

will reset lldb to frame 0 of the current thread. Further ‘list’ commands will list from there.

You can also say “list -a $pc”.

But it would be convenient to have a “list —current-frame” or something which would list the pc of the currently selected frame (kind of but not exactly equivalent to “disassemble -f” but “-f” is already take for file so we’ll have to choose a different letter. Feel free to file an enhancement request or propose a patch if this seems interesting to you...