summaryrefslogtreecommitdiff
path: root/platform.cpp
diff options
context:
space:
mode:
authorRyan Snyder <ryan@vector35.com>2021-08-04 11:17:40 -0400
committerRyan Snyder <ryan@vector35.com>2021-08-20 04:34:14 -0400
commitcc1e85a4a8b2001f9fd6cf91b93fb39abef3a0e2 (patch)
tree45fdf52d2bdb8e09f57fc76079a3a91b6528f4a1 /platform.cpp
parentc1e526ea39d97c4c374de4cf8c211dc39ebbb538 (diff)
platforms: specify platform types and add bvt platform callbacks
Diffstat (limited to 'platform.cpp')
-rw-r--r--platform.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/platform.cpp b/platform.cpp
index 54fdbcc6..181f4e7c 100644
--- a/platform.cpp
+++ b/platform.cpp
@@ -36,6 +36,16 @@ Platform::Platform(Architecture* arch, const string& name)
}
+Platform::Platform(Architecture* arch, const string& name, const string& typeFile, const vector<string>& includeDirs)
+{
+ const char** includeDirList = new const char*[includeDirs.size()];
+ for (size_t i = 0; i < includeDirs.size(); i++)
+ includeDirList[i] = includeDirs[i].c_str();
+ m_object = BNCreatePlatformWithTypes(arch->GetObject(), name.c_str(), typeFile.c_str(), includeDirList, includeDirs.size());
+ delete[] includeDirList;
+}
+
+
Ref<Architecture> Platform::GetArchitecture() const
{
return new CoreArchitecture(BNGetPlatformArchitecture(m_object));