diff options
| author | kat <kat@vector35.com> | 2024-07-24 11:15:31 -0400 |
|---|---|---|
| committer | kat <kat@vector35.com> | 2024-07-24 11:30:01 -0400 |
| commit | 892a0729a587d3a4e8ac248e4eee8a73c7ccc5d1 (patch) | |
| tree | 318cd5a947b4c1feb9ca84c92f3a457338eeb93d /platform.cpp | |
| parent | dfca98643532126fa78999192900d37b654e46ff (diff) | |
Add Platform::GetRelatedPlatforms
Diffstat (limited to 'platform.cpp')
| -rw-r--r-- | platform.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/platform.cpp b/platform.cpp index 55044595..dc01b5ae 100644 --- a/platform.cpp +++ b/platform.cpp @@ -532,6 +532,22 @@ void Platform::AddRelatedPlatform(Architecture* arch, Platform* platform) } +std::vector<Ref<Platform>> Platform::GetRelatedPlatforms() +{ + size_t count; + BNPlatform** related = BNGetRelatedPlatforms(m_object, &count); + + std::vector<Ref<Platform>> result; + for (size_t i = 0; i < count; i++) + { + result.push_back(new CorePlatform(BNNewPlatformReference(related[i]))); + } + + BNFreePlatformList(related, count); + return result; +} + + Ref<Platform> Platform::GetAssociatedPlatformByAddress(uint64_t& addr) { BNPlatform* platform = BNGetAssociatedPlatformByAddress(m_object, &addr); |
