hope to obtain sourceFile and sourceLine through the Ghidra API, similar to idaapi.get_source_linnum() and idaapi.get_sourcefile(). #7246
Answered
by
ghidracadabra
funny-mud-peee
asked this question in
Q&A
-
I want to know how to obtain the source file and line number through the Ghidra API, similar to how IDA provides interfaces: idaapi.get_source_linnum() and idaapi.get_sourcefile(). |
Beta Was this translation helpful? Give feedback.
Answered by
ghidracadabra
Jan 10, 2025
Replies: 1 comment 1 reply
-
We've recently added this capability. It's in the master branch but not yet in an official release. You can get this information from a program's |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
funny-mud-peee
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We've recently added this capability. It's in the master branch but not yet in an official release. You can get this information from a program's
SourceFileManager
(currentProgram.getSourceFileManager()
in a script). The DWARF and PDB analyzers have been updated to record this information by default.