mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 02:09:44 +02:00
GP-5455 golang interface method calling and decl
Improve how golang interface methods are handled. Model the 'vtable' (runtime.itab) for a golang interface so each method declared by the interface gets a funcdef that specifies the method's params.
This commit is contained in:
parent
ecfd6d39d8
commit
2d3922d41f
29 changed files with 301 additions and 182 deletions
|
@ -27,7 +27,7 @@ import ghidra.app.util.bin.format.dwarf.line.DWARFLine.SourceFileAddr;
|
|||
import ghidra.app.util.bin.format.dwarf.sectionprovider.DWARFSectionProvider;
|
||||
import ghidra.app.util.bin.format.dwarf.sectionprovider.DWARFSectionProviderFactory;
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.listing.CodeUnit;
|
||||
import ghidra.program.model.listing.CommentType;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
|
||||
|
@ -63,7 +63,7 @@ public class DWARFLineInfoCommentScript extends GhidraScript {
|
|||
List<SourceFileAddr> allSFA = cu.getLine().getAllSourceFileAddrInfo(cu, reader);
|
||||
for (SourceFileAddr sfa : allSFA) {
|
||||
Address addr = dprog.getCodeAddress(sfa.address());
|
||||
DWARFUtil.appendComment(currentProgram, addr, CodeUnit.EOL_COMMENT, "",
|
||||
DWARFUtil.appendComment(currentProgram, addr, CommentType.EOL, "",
|
||||
"%s:%d".formatted(sfa.fileName(), sfa.lineNum()), ";");
|
||||
count++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue