mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-02 23:58:51 +08:00
Merge remote-tracking branch 'origin/GP-0_ghizard_fix_demangler_skip_logic'
This commit is contained in:
@@ -332,7 +332,7 @@ public abstract class DemangledObject implements Demangled {
|
|||||||
throw new DemangledException("Symbol did not demangle at address: " + address);
|
throw new DemangledException("Symbol did not demangle at address: " + address);
|
||||||
}
|
}
|
||||||
if (!address.isMemoryAddress() || !program.getMemory().contains(address)) {
|
if (!address.isMemoryAddress() || !program.getMemory().contains(address)) {
|
||||||
throw new IllegalArgumentException("Invalid program memory address: " + address);
|
return true; // skip this symbol
|
||||||
}
|
}
|
||||||
|
|
||||||
String comment = program.getListing().getComment(CodeUnit.PLATE_COMMENT, address);
|
String comment = program.getListing().getComment(CodeUnit.PLATE_COMMENT, address);
|
||||||
|
|||||||
+2
-3
@@ -263,8 +263,7 @@ public class DemangledFunctionTest extends AbstractGhidraHeadlessIntegrationTest
|
|||||||
|
|
||||||
String className =
|
String className =
|
||||||
"F<class_E::D::G<struct_E::D::H<bool_(__cdecl*const)(enum_C::B_const&),0>,bool,enum_C::B_const&>_>";
|
"F<class_E::D::G<struct_E::D::H<bool_(__cdecl*const)(enum_C::B_const&),0>,bool,enum_C::B_const&>_>";
|
||||||
String functionName =
|
String functionName = className + "<class_E::D::A<bool,enum_C::B_const&>_>";
|
||||||
className + "<class_E::D::A<bool,enum_C::B_const&>_>";
|
|
||||||
|
|
||||||
Function function = assertFunction(functionName, addr);
|
Function function = assertFunction(functionName, addr);
|
||||||
assertNoBookmarkAt(addr);
|
assertNoBookmarkAt(addr);
|
||||||
@@ -294,7 +293,7 @@ public class DemangledFunctionTest extends AbstractGhidraHeadlessIntegrationTest
|
|||||||
* location symbol.
|
* location symbol.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testApply_ExtrnalFunctionInClassInNamespace() throws Exception {
|
public void testApply_ExternalFunctionInClassInNamespace() throws Exception {
|
||||||
|
|
||||||
// this is: public long __thiscall ATL::CRegKey::Close(void)
|
// this is: public long __thiscall ATL::CRegKey::Close(void)
|
||||||
String mangled = "?Close@CRegKey@ATL@@QAEJXZ";
|
String mangled = "?Close@CRegKey@ATL@@QAEJXZ";
|
||||||
|
|||||||
Reference in New Issue
Block a user