mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-22 04:05:39 +00:00
GP-0: Fixing warning in GhidraScript.java
This commit is contained in:
parent
a3d606ad87
commit
d4a3e7d4bf
@ -938,12 +938,12 @@ public abstract class GhidraScript extends FlatProgramAPI {
|
|||||||
* Returns a demangled version of the mangled string.
|
* Returns a demangled version of the mangled string.
|
||||||
*
|
*
|
||||||
* @param mangled the mangled string to demangled
|
* @param mangled the mangled string to demangled
|
||||||
* @return a demangled version of the mangled string
|
* @return a demangled version of the mangled string, or null if it could not be demangled
|
||||||
*/
|
*/
|
||||||
public String getDemangled(String mangled) {
|
public String getDemangled(String mangled) {
|
||||||
DemangledObject demangledObj = DemanglerUtil.demangle(mangled);
|
List<DemangledObject> demangledObjs = DemanglerUtil.demangle(currentProgram, mangled, null);
|
||||||
if (demangledObj != null) {
|
if (!demangledObjs.isEmpty()) {
|
||||||
return demangledObj.getSignature(false);
|
return demangledObjs.getFirst().getSignature(false);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ public class DemanglerUtil {
|
|||||||
* Deprecated. Use {@link #demangle(Program, String, Address)}. See class header for more
|
* Deprecated. Use {@link #demangle(Program, String, Address)}. See class header for more
|
||||||
* details.
|
* details.
|
||||||
*
|
*
|
||||||
* 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.
|
* 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
|
||||||
@ -131,9 +131,9 @@ public class DemanglerUtil {
|
|||||||
* {@link Demangler#createMangledContext(String, DemanglerOptions, Program, Address)} and
|
* {@link Demangler#createMangledContext(String, DemanglerOptions, Program, Address)} and
|
||||||
* {@link Demangler#createDefaultOptions()}.
|
* {@link Demangler#createDefaultOptions()}.
|
||||||
*
|
*
|
||||||
* @param program the program containing the mangled name
|
* @param program the program containing the mangled name; can be null
|
||||||
* @param mangled the mangled name
|
* @param mangled the mangled name
|
||||||
* @param address the address of the mangled name
|
* @param address the address of the mangled name; can be null
|
||||||
* @return the list of {@link DemangledObject}
|
* @return the list of {@link DemangledObject}
|
||||||
*/
|
*/
|
||||||
public static List<DemangledObject> demangle(Program program, String mangled, Address address) {
|
public static List<DemangledObject> demangle(Program program, String mangled, Address address) {
|
||||||
|
Loading…
Reference in New Issue
Block a user