@@ -44,6 +44,7 @@ Platform::Platform(Architecture* arch, const string& name)
4444 plat.getGlobalRegisterType = GetGlobalRegisterTypeCallback;
4545 plat.adjustTypeParserInput = AdjustTypeParserInputCallback;
4646 plat.freeTypeParserInput = FreeTypeParserInputCallback;
47+ plat.getFallbackEnabled = GetFallbackEnabledCallback;
4748 m_object = BNCreateCustomPlatform (arch->GetObject (), name.c_str (), &plat);
4849 AddRefForRegistration ();
4950}
@@ -60,6 +61,7 @@ Platform::Platform(Architecture* arch, const string& name, const string& typeFil
6061 plat.getGlobalRegisterType = GetGlobalRegisterTypeCallback;
6162 plat.adjustTypeParserInput = AdjustTypeParserInputCallback;
6263 plat.freeTypeParserInput = FreeTypeParserInputCallback;
64+ plat.getFallbackEnabled = GetFallbackEnabledCallback;
6365 const char ** includeDirList = new const char *[includeDirs.size ()];
6466 for (size_t i = 0 ; i < includeDirs.size (); i++)
6567 includeDirList[i] = includeDirs[i].c_str ();
@@ -191,6 +193,12 @@ BNType* Platform::GetGlobalRegisterTypeCallback(void* ctxt, uint32_t reg)
191193 return BNNewTypeReference (result->GetObject ());
192194}
193195
196+ bool Platform::GetFallbackEnabledCallback (void * ctxt)
197+ {
198+ CallbackRef<Platform> plat (ctxt);
199+ return plat->GetFallbackEnabled ();
200+ }
201+
194202
195203Ref<Architecture> Platform::GetArchitecture () const
196204{
@@ -410,6 +418,12 @@ Ref<Type> Platform::GetGlobalRegisterType(uint32_t reg)
410418}
411419
412420
421+ bool Platform::GetFallbackEnabled ()
422+ {
423+ return true ;
424+ }
425+
426+
413427std::vector<uint32_t > CorePlatform::GetGlobalRegisters ()
414428{
415429 size_t count;
0 commit comments