mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-25 17:00:36 -09:00
GP-0 tweak golang analyzer name / description
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user