mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 02:09:44 +02:00
GP-4482 Golang 1.16 + 1.15
This commit is contained in:
parent
db608a1a13
commit
560d5691a7
32 changed files with 851 additions and 374 deletions
|
@ -18,11 +18,10 @@
|
|||
// specified for the arch.
|
||||
//@category Functions
|
||||
//@menupath Tools.Fix Golang Function Param Storage
|
||||
import java.util.List;
|
||||
|
||||
import ghidra.app.script.GhidraScript;
|
||||
import ghidra.app.util.bin.format.golang.GoFunctionFixup;
|
||||
import ghidra.app.util.bin.format.golang.GoVer;
|
||||
import ghidra.app.util.bin.format.golang.rtti.GoRttiMapper;
|
||||
import ghidra.program.model.listing.Function;
|
||||
|
||||
public class FixupGolangFuncParamStorageScript extends GhidraScript {
|
||||
|
@ -34,10 +33,9 @@ public class FixupGolangFuncParamStorageScript extends GhidraScript {
|
|||
return;
|
||||
}
|
||||
GoVer goVersion = GoVer.fromProgramProperties(currentProgram);
|
||||
if ( goVersion == GoVer.UNKNOWN ) {
|
||||
List<GoVer> versions = List.of(GoVer.values());
|
||||
goVersion =
|
||||
askChoice("Golang Version", "What is the golang version?", versions, GoVer.UNKNOWN);
|
||||
if (goVersion == GoVer.INVALID) {
|
||||
goVersion = askChoice("Golang Version", "What is the golang version?",
|
||||
GoRttiMapper.getAllSupportedVersions(), GoVer.INVALID);
|
||||
}
|
||||
println("Fixing param storage for function %s@%s".formatted(func.getName(),
|
||||
func.getEntryPoint()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue