[lldb-dev] Get source file name from Python API?
Pavel Labath via lldb-dev
lldb-dev at lists.llvm.org
Mon Mar 25 05:53:29 PDT 2019
On 23/03/2019 22:20, Ian Fang via lldb-dev wrote:
> 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
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
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
More information about the lldb-dev
mailing list