summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binaryninjaapi.h2
-rw-r--r--binaryninjacore.h2
-rw-r--r--platform.cpp4
-rw-r--r--python/platform.py4
4 files changed, 6 insertions, 6 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 7e18a259..cc5ff914 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -4145,7 +4145,7 @@ namespace BinaryNinja
std::map<uint32_t, QualifiedNameAndType> GetSystemCalls();
Ref<Type> GetTypeByName(const QualifiedName& name);
Ref<Type> GetVariableByName(const QualifiedName& name);
- Ref<Type> GetFunctionByName(const QualifiedName& name);
+ Ref<Type> GetFunctionByName(const QualifiedName& name, bool exactMatch = false);
std::string GetSystemCallName(uint32_t n);
Ref<Type> GetSystemCallType(uint32_t n);
diff --git a/binaryninjacore.h b/binaryninjacore.h
index 1bf9b6c0..a7dc19df 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -3691,7 +3691,7 @@ extern "C"
BINARYNINJACOREAPI void BNFreeSystemCallList(BNSystemCallInfo* syscalls, size_t count);
BINARYNINJACOREAPI BNType* BNGetPlatformTypeByName(BNPlatform* platform, BNQualifiedName* name);
BINARYNINJACOREAPI BNType* BNGetPlatformVariableByName(BNPlatform* platform, BNQualifiedName* name);
- BINARYNINJACOREAPI BNType* BNGetPlatformFunctionByName(BNPlatform* platform, BNQualifiedName* name);
+ BINARYNINJACOREAPI BNType* BNGetPlatformFunctionByName(BNPlatform* platform, BNQualifiedName* name, bool exactMatch);
BINARYNINJACOREAPI char* BNGetPlatformSystemCallName(BNPlatform* platform, uint32_t number);
BINARYNINJACOREAPI BNType* BNGetPlatformSystemCallType(BNPlatform* platform, uint32_t number);
diff --git a/platform.cpp b/platform.cpp
index d5067ea8..3bb1f6c5 100644
--- a/platform.cpp
+++ b/platform.cpp
@@ -353,10 +353,10 @@ Ref<Type> Platform::GetVariableByName(const QualifiedName& name)
}
-Ref<Type> Platform::GetFunctionByName(const QualifiedName& name)
+Ref<Type> Platform::GetFunctionByName(const QualifiedName& name, bool exactMatch)
{
BNQualifiedName nameObj = name.GetAPIObject();
- BNType* type = BNGetPlatformFunctionByName(m_object, &nameObj);
+ BNType* type = BNGetPlatformFunctionByName(m_object, &nameObj, exactMatch);
QualifiedName::FreeAPIObject(&nameObj);
if (!type)
return nullptr;
diff --git a/python/platform.py b/python/platform.py
index 0b628225..08b064fa 100644
--- a/python/platform.py
+++ b/python/platform.py
@@ -345,9 +345,9 @@ class Platform(with_metaclass(_PlatformMetaClass, object)):
return None
return types.Type(obj, platform = self)
- def get_function_by_name(self, name):
+ def get_function_by_name(self, name, exactMatch=False):
name = types.QualifiedName(name)._get_core_struct()
- obj = core.BNGetPlatformFunctionByName(self.handle, name)
+ obj = core.BNGetPlatformFunctionByName(self.handle, name, exactMatch)
if not obj:
return None
return types.Type(obj, platform = self)