mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-22 04:05:39 +00:00
GP-4898: Fixes for the SwiftDemangler
This commit is contained in:
parent
fd1a448bf5
commit
ce2f8b94cf
@ -106,15 +106,6 @@ public class SwiftDemangler implements Demangler {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public DemangledObject demangle(MangledContext context) throws DemangledException {
|
|
||||||
DemanglerOptions op = context.getOptions();
|
|
||||||
String mangled = context.getMangled();
|
|
||||||
DemangledObject demangledObject = demangle(mangled, op);
|
|
||||||
demangledObject.setMangledContext(context);
|
|
||||||
return demangledObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a new {@link Demangled} by demangling the given mangled string
|
* Get a new {@link Demangled} by demangling the given mangled string
|
||||||
*
|
*
|
||||||
|
@ -702,4 +702,10 @@ public class SwiftDemanglerTest extends AbstractGenericTest {
|
|||||||
}
|
}
|
||||||
assertEquals(demangled, function.toString());
|
assertEquals(demangled, function.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testUnsupportedString() throws Exception {
|
||||||
|
String mangled = "__mh_execute_header";
|
||||||
|
assertNull(demangler.demangle(mangled));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user