Get source file name from Python API?

Hi Folks,

Is there anyway to get the source file name for the current stop context? I am looking for something like the result of “source info”, but from Python API.

Thanks!
Ian

Hi Ian,

you should find everything you need through the functions of the SBFrame object <https://lldb.llvm.org/cpp_reference/html/classlldb_1_1SBFrame.html> for the frame you are interested in. E.g., to get the file+line info you should look at GetSymbolContext().GetLineEntry().

pl