mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
GP-3674 updated RTTI script to work in headless mode.
This commit is contained in:
parent
d33dc66594
commit
84705bb8fb
2 changed files with 75 additions and 25 deletions
|
@ -59,13 +59,22 @@ public class DecompilerScriptUtils {
|
|||
|
||||
DecompileOptions options;
|
||||
options = new DecompileOptions();
|
||||
OptionsService service = tool.getService(OptionsService.class);
|
||||
if (service != null) {
|
||||
ToolOptions opt = service.getOptions("Decompiler");
|
||||
options.grabFromToolAndProgram(null, opt, program);
|
||||
}
|
||||
decompInterface.setOptions(options);
|
||||
|
||||
if (tool == null) {
|
||||
options.grabFromProgram(program);
|
||||
}
|
||||
else {
|
||||
OptionsService service = tool.getService(OptionsService.class);
|
||||
if (service != null) {
|
||||
ToolOptions opt = service.getOptions("Decompiler");
|
||||
options.grabFromToolAndProgram(null, opt, program);
|
||||
}
|
||||
else {
|
||||
options.grabFromProgram(program);
|
||||
}
|
||||
}
|
||||
|
||||
decompInterface.setOptions(options);
|
||||
decompInterface.toggleCCode(true);
|
||||
decompInterface.toggleSyntaxTree(true);
|
||||
decompInterface.setSimplificationStyle("decompile");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue