diff options
Diffstat (limited to 'platform.cpp')
| -rw-r--r-- | platform.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/platform.cpp b/platform.cpp index ec27b710..55044595 100644 --- a/platform.cpp +++ b/platform.cpp @@ -44,6 +44,7 @@ Platform::Platform(Architecture* arch, const string& name) plat.getGlobalRegisterType = GetGlobalRegisterTypeCallback; plat.adjustTypeParserInput = AdjustTypeParserInputCallback; plat.freeTypeParserInput = FreeTypeParserInputCallback; + plat.getFallbackEnabled = GetFallbackEnabledCallback; m_object = BNCreateCustomPlatform(arch->GetObject(), name.c_str(), &plat); AddRefForRegistration(); } @@ -60,6 +61,7 @@ Platform::Platform(Architecture* arch, const string& name, const string& typeFil plat.getGlobalRegisterType = GetGlobalRegisterTypeCallback; plat.adjustTypeParserInput = AdjustTypeParserInputCallback; plat.freeTypeParserInput = FreeTypeParserInputCallback; + plat.getFallbackEnabled = GetFallbackEnabledCallback; const char** includeDirList = new const char*[includeDirs.size()]; for (size_t i = 0; i < includeDirs.size(); i++) includeDirList[i] = includeDirs[i].c_str(); @@ -191,6 +193,12 @@ BNType* Platform::GetGlobalRegisterTypeCallback(void* ctxt, uint32_t reg) return BNNewTypeReference(result->GetObject()); } +bool Platform::GetFallbackEnabledCallback(void* ctxt) +{ + CallbackRef<Platform> plat(ctxt); + return plat->GetFallbackEnabled(); +} + Ref<Architecture> Platform::GetArchitecture() const { @@ -410,6 +418,12 @@ Ref<Type> Platform::GetGlobalRegisterType(uint32_t reg) } +bool Platform::GetFallbackEnabled() +{ + return true; +} + + std::vector<uint32_t> CorePlatform::GetGlobalRegisters() { size_t count; |
