summaryrefslogtreecommitdiff
path: root/binaryview.cpp
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-07-13 19:09:58 -0400
committerMason Reed <mason@vector35.com>2025-07-15 12:34:43 -0400
commit41213e0c959b4b11e3059b60ec5248b31024d236 (patch)
treed47fd4caee967233f2f9ae3b5403aba333de29a6 /binaryview.cpp
parentbd1b6b8a1a75df296da5c7afa8107ba301c9cd8e (diff)
Expose analysis' system call type and name retrieval
Previously we only really had a way to access the platform system call information, this was missing the system call information found in type libraries Fixes https://github.com/Vector35/binaryninja-api/issues/7089
Diffstat (limited to 'binaryview.cpp')
-rw-r--r--binaryview.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/binaryview.cpp b/binaryview.cpp
index 433767c0..f2e72930 100644
--- a/binaryview.cpp
+++ b/binaryview.cpp
@@ -4392,6 +4392,24 @@ void BinaryView::RenameType(const QualifiedName& oldName, const QualifiedName& n
}
+Ref<Type> BinaryView::GetSystemCallType(Platform *platform, uint32_t id)
+{
+ BNType* type = BNGetAnalysisSystemCallType(m_object, platform->m_object, id);
+ if (!type)
+ return nullptr;
+ return new Type(type);
+}
+
+
+std::string BinaryView::GetSystemCallName(Platform *platform, uint32_t id)
+{
+ char* name = BNGetAnalysisSystemCallName(m_object, platform->m_object, id);
+ string result = name;
+ BNFreeString(name);
+ return result;
+}
+
+
void BinaryView::RegisterPlatformTypes(Platform* platform)
{
BNRegisterPlatformTypes(m_object, platform->GetObject());