MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / GetLoadSettingsForData

Method GetLoadSettingsForData

view/md1rom/md1rom.cpp:421–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419
420
421Ref<Settings> Md1romViewType::GetLoadSettingsForData(BinaryNinja::BinaryView* data)
422{
423 Ref<BinaryView> viewRef = Parse(data);
424 if (!viewRef || !viewRef->Init())
425 {
426 m_logger->LogWarn("Failed to initialize view of type '%s'. Generating default load settings.", GetName().c_str());
427 viewRef = data;
428 }
429
430 Ref<Settings> settings = GetDefaultLoadSettingsForData(viewRef);
431
432 // specify default load settings that can be overridden
433 vector<string> overrides = {"loader.imageBase", "loader.platform"};
434 for (const auto& override : overrides)
435 {
436 if (settings->Contains(override))
437 settings->UpdateProperty(override, "readOnly", false);
438 }
439 return settings;
440}
441
442
443extern "C"

Callers

nothing calls this directly

Calls 5

LogWarnMethod · 0.80
c_strMethod · 0.80
UpdatePropertyMethod · 0.80
InitMethod · 0.45
ContainsMethod · 0.45

Tested by

no test coverage detected