Ghidra is a software reverse engineering (SRE) framework
GP-5023: Deprecating GhidraScript.getDemangled()
Ryan Kurtza5c0dd989734
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/script/GhidraScript.java b/Ghidra/Features/Base/src/main/java/ghidra/app/script/GhidraScript.javaindex cd0ba37e1a..c462aa4594 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/script/GhidraScript.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/script/GhidraScript.java@@ -1002,7 +1002,9 @@ public abstract class GhidraScript extends FlatProgramAPI {** @param mangled the mangled string to demangled* @return a demangled version of the mangled string, or null if it could not be demangled+ * @deprecated Use {@link DemanglerUtil#demangle(Program, String, Address)} instead*/+ @Deprecated(since = "11.5")public String getDemangled(String mangled) {List<DemangledObject> demangledObjs = DemanglerUtil.demangle(currentProgram, mangled, null);if (!demangledObjs.isEmpty()) {diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/demangler/DemanglerUtil.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/demangler/DemanglerUtil.javaindex e8e0624fc6..7ce7a47dbe 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/demangler/DemanglerUtil.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/demangler/DemanglerUtil.java@@ -46,11 +46,11 @@ public class DemanglerUtil {/*** Deprecated. Use {@link #demangle(Program, String, Address)}. See class header for more* details.- *+ * <p>* Locates all available demanglers, then it attempts to demangle. This method will* query all demanglers regardless of architecture.- *- * <p>This method will use only the default options for demangling. If you need to+ * <p>+ * This method will use only the default options for demangling. If you need to* specify options, then you will have to call each specific demangler directly, creating* the options and mangled context specifically needed for each demangler. See* {@link Demangler#createMangledContext(String, DemanglerOptions, Program, Address)} and@@ -82,11 +82,11 @@ public class DemanglerUtil {/*** Deprecated. Use {@link #demangle(Program, String, Address)}. See class header for more* details.- *- * <p>Locates all available demanglers and checks to see if the supplied program is+ * <p>+ * Locates all available demanglers and checks to see if the supplied program is* supported, then it attempts to demangle.- *- * <p>This method will use only the default options for demangling. If you need to+ * <p>+ * This method will use only the default options for demangling. If you need to* specify options, then you will have to call each specific demangler directly, creating* the options and mangled context specifically needed for each demangler. See* {@link Demangler#createMangledContext(String, DemanglerOptions, Program, Address)} and@@ -123,9 +123,9 @@ public class DemanglerUtil {/*** Locates all available demanglers and checks to see if the supplied program is* supported, then it attempts to demangle. Returns a list of {@link DemangledObject} of- * successful demanglings- *- * <p>This method will use only the default options for demangling. If you need to+ * successful demanglings.+ * <p>+ * This method will use only the default options for demangling. If you need to* specify options, then you will have to call each specific demangler directly, creating* the options and mangled context specifically needed for each demangler. See* {@link Demangler#createMangledContext(String, DemanglerOptions, Program, Address)} and@@ -170,6 +170,7 @@ public class DemanglerUtil {/*** Remove superfluous function signature spaces from specified string+ ** @param str string* @return string with unwanted spaces removed*/