diff options
| author | Rusty Wagner <rusty@vector35.com> | 2016-02-02 23:58:19 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2016-02-02 23:58:19 -0500 |
| commit | 290df8eef95d0d7f2f0e99c91b104b4b02f2bd22 (patch) | |
| tree | 156ddeddebfe71737222aeaf4a62d3936df3481e /platform.cpp | |
| parent | f0ab57068974f11cc19a95e9672af22ba2ea2ae2 (diff) | |
Detect system calls that do not return
Diffstat (limited to 'platform.cpp')
| -rw-r--r-- | platform.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/platform.cpp b/platform.cpp index da072dd8..d4af6750 100644 --- a/platform.cpp +++ b/platform.cpp @@ -166,6 +166,15 @@ vector<Ref<CallingConvention>> Platform::GetCallingConventions() const } +Ref<CallingConvention> 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> Platform::GetRelatedPlatform(Architecture* arch) { BNPlatform* platform = BNGetRelatedPlatform(m_object, arch->GetObject()); |
