mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 02:09:44 +02:00
Show spec files in Help About Program
This commit is contained in:
parent
b9cd9016b7
commit
cd9a57d859
1 changed files with 13 additions and 1 deletions
|
@ -34,6 +34,7 @@ import ghidra.framework.main.datatable.ProjectDataContext;
|
||||||
import ghidra.framework.model.DomainFile;
|
import ghidra.framework.model.DomainFile;
|
||||||
import ghidra.framework.plugintool.*;
|
import ghidra.framework.plugintool.*;
|
||||||
import ghidra.framework.plugintool.util.PluginStatus;
|
import ghidra.framework.plugintool.util.PluginStatus;
|
||||||
|
import ghidra.program.model.lang.*;
|
||||||
import ghidra.program.model.listing.Program;
|
import ghidra.program.model.listing.Program;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
|
|
||||||
|
@ -106,7 +107,18 @@ public class AboutProgramPlugin extends Plugin implements ApplicationLevelPlugin
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ProgramActionContext context) {
|
public void actionPerformed(ProgramActionContext context) {
|
||||||
Program program = context.getProgram();
|
Program program = context.getProgram();
|
||||||
showAbout(program.getDomainFile(), program.getMetadata());
|
|
||||||
|
Map<String, String> metadata = program.getMetadata();
|
||||||
|
String cspec = program.getCompilerSpec().getCompilerSpecDescription().getSource();
|
||||||
|
metadata.put("Compiler Spec", cspec);
|
||||||
|
|
||||||
|
Language language = program.getLanguage();
|
||||||
|
LanguageDescription languageDescription = language.getLanguageDescription();
|
||||||
|
if (languageDescription instanceof SleighLanguageDescription sleighDescription) {
|
||||||
|
metadata.put("Sleigh Spec", sleighDescription.getSlaFile().toString() + "spec");
|
||||||
|
metadata.put("Processor Spec", sleighDescription.getSpecFile().toString());
|
||||||
|
}
|
||||||
|
showAbout(program.getDomainFile(), metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue