From 290df8eef95d0d7f2f0e99c91b104b4b02f2bd22 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Tue, 2 Feb 2016 23:58:19 -0500 Subject: Detect system calls that do not return --- platform.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'platform.cpp') diff --git a/platform.cpp b/platform.cpp index da072dd8..d4af6750 100644 --- a/platform.cpp +++ b/platform.cpp @@ -166,6 +166,15 @@ vector> Platform::GetCallingConventions() const } +Ref Platform::GetSystemCallConvention() const +{ + BNCallingConvention* cc = BNGetPlatformSystemCallConvention(m_object); + if (!cc) + return nullptr; + return new CoreCallingConvention(cc); +} + + void Platform::RegisterCallingConvention(CallingConvention* cc) { BNRegisterPlatformCallingConvention(m_object, cc->GetObject()); @@ -196,6 +205,12 @@ void Platform::RegisterFastcallCallingConvention(CallingConvention* cc) } +void Platform::SetSystemCallConvention(CallingConvention* cc) +{ + BNSetPlatformSystemCallConvention(m_object, cc ? cc->GetObject() : nullptr); +} + + Ref Platform::GetRelatedPlatform(Architecture* arch) { BNPlatform* platform = BNGetRelatedPlatform(m_object, arch->GetObject()); -- cgit v1.3.1