From 41213e0c959b4b11e3059b60ec5248b31024d236 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sun, 13 Jul 2025 19:09:58 -0400 Subject: 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 --- binaryview.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'binaryview.cpp') 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 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()); -- cgit v1.3.1