From 41fc2194692d153e56ecd758346db4940836a5bb Mon Sep 17 00:00:00 2001 From: Stanley He Date: Fri, 31 Jan 2025 15:08:27 +1100 Subject: [PATCH] FunctionID: Add Rust and Swift demanglers to headless Prescript --- .../ghidra_scripts/FunctionIDHeadlessPrescript.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Ghidra/Features/FunctionID/ghidra_scripts/FunctionIDHeadlessPrescript.java b/Ghidra/Features/FunctionID/ghidra_scripts/FunctionIDHeadlessPrescript.java index 8376f7ac40..7fd8a014a0 100644 --- a/Ghidra/Features/FunctionID/ghidra_scripts/FunctionIDHeadlessPrescript.java +++ b/Ghidra/Features/FunctionID/ghidra_scripts/FunctionIDHeadlessPrescript.java @@ -34,6 +34,8 @@ public class FunctionIDHeadlessPrescript extends GhidraScript { private static final String LIBRARY_IDENTIFICATION = "Library Identification"; private static final String DEMANGLER_MS_ANALYZER = "Demangler Microsoft"; private static final String DEMANGLER_GNU_ANALYZER = "Demangler GNU"; + private static final String DEMANGLER_RUST_ANALYZER = "Demangler Rust"; + private static final String DEMANGLER_SWIFT_ANALYZER = "Demangler Swift"; private static final String SCALAR_OPERAND_ANALYZER = "Scalar Operand References"; @Override @@ -51,6 +53,12 @@ public class FunctionIDHeadlessPrescript extends GhidraScript { if (options.containsKey(DEMANGLER_GNU_ANALYZER)) { setAnalysisOption(currentProgram, DEMANGLER_GNU_ANALYZER, "false"); } + if (options.containsKey(DEMANGLER_RUST_ANALYZER)) { + setAnalysisOption(currentProgram, DEMANGLER_RUST_ANALYZER, "false"); + } + if (options.containsKey(DEMANGLER_SWIFT_ANALYZER)) { + setAnalysisOption(currentProgram, DEMANGLER_SWIFT_ANALYZER, "false"); + } if (options.containsKey(SCALAR_OPERAND_ANALYZER)) { setAnalysisOption(currentProgram, SCALAR_OPERAND_ANALYZER, "true"); }