GP-0 tweak golang analyzer name / description

This commit is contained in:
dev747368
2024-03-12 15:42:42 +00:00
parent 44eedbe904
commit 97ecf95aa2
4 changed files with 7 additions and 6 deletions

View File

@@ -25,6 +25,7 @@ import generic.jar.ResourceFile;
import ghidra.app.cmd.function.ApplyFunctionDataTypesCmd;
import ghidra.app.plugin.core.datamgr.util.DataTypeArchiveUtility;
import ghidra.app.services.*;
import ghidra.app.util.bin.format.golang.rtti.GoRttiMapper;
import ghidra.app.util.importer.MessageLog;
import ghidra.framework.Application;
import ghidra.framework.model.*;
@@ -84,7 +85,7 @@ public class ApplyDataArchiveAnalyzer extends AbstractAnalyzer {
@Override
public boolean getDefaultEnablement(Program program) {
if ("golang".equals(program.getCompilerSpec().getCompilerSpecID().toString())) {
if (GoRttiMapper.isGolangProgram(program)) {
return false;
}
return super.getDefaultEnablement(program);

View File

@@ -63,9 +63,8 @@ import ghidra.util.task.UnknownProgressWrappingTaskMonitor;
* elements that the slice points to.
*/
public class GolangStringAnalyzer extends AbstractAnalyzer {
private final static String NAME = "Golang String Analyzer";
private final static String DESCRIPTION =
"Finds and labels Go string structures that have been referenced from a function.";
private final static String NAME = "Golang Strings";
private final static String DESCRIPTION = "Finds and labels Golang string structures.";
private GolangStringAnalyzerOptions analyzerOptions = new GolangStringAnalyzerOptions();
private GoRttiMapper goBinary;

View File

@@ -65,7 +65,7 @@ import utilities.util.FileUtilities;
*/
public class GolangSymbolAnalyzer extends AbstractAnalyzer {
private final static String NAME = "Golang Symbol";
private final static String NAME = "Golang Symbols";
private final static String DESCRIPTION = """
Analyze Golang binaries for RTTI and function symbols.
'Apply Data Archives' and 'Shared Return Calls' analyzers should be disabled \

View File

@@ -17,6 +17,7 @@ package ghidra.app.plugin.core.function;
import ghidra.app.cmd.analysis.SharedReturnAnalysisCmd;
import ghidra.app.services.*;
import ghidra.app.util.bin.format.golang.rtti.GoRttiMapper;
import ghidra.app.util.importer.MessageLog;
import ghidra.framework.options.Options;
import ghidra.program.model.address.AddressSetView;
@@ -87,7 +88,7 @@ public class SharedReturnAnalyzer extends AbstractAnalyzer {
boolean sharedReturnEnabled = language.getPropertyAsBoolean(
GhidraLanguagePropertyKeys.ENABLE_SHARED_RETURN_ANALYSIS, true);
if ("golang".equals(program.getCompilerSpec().getCompilerSpecID().toString())) {
if (GoRttiMapper.isGolangProgram(program)) {
sharedReturnEnabled = false;
}