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

Method GetObjCRelativeMethodBaseAddress

view/sharedcache/core/ObjC.cpp:135–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135uint64_t SharedCacheObjCProcessor::GetObjCRelativeMethodBaseAddress(ObjCReader* reader)
136{
137 // Try and retrieve the base address of the selector stuff.
138 if (const auto controller = DSC::SharedCacheController::FromView(*m_data))
139 {
140 auto baseAddress = controller->GetCache().GetBaseAddress();
141 auto dangerReader = dynamic_cast<SharedCacheObjCReader*>(reader)->GetVMReader();
142 if (const auto header = GetObjCOptimizationHeader(controller->GetCache(), dangerReader); header.has_value())
143 {
144 m_customRelativeMethodSelectorBase = baseAddress + header->relativeMethodSelectorBaseAddressOffset;
145 }
146 }
147
148 return m_customRelativeMethodSelectorBase.value_or(0);
149}
150
151Ref<Symbol> SharedCacheObjCProcessor::GetSymbol(uint64_t address)
152{

Callers

nothing calls this directly

Calls 2

GetBaseAddressMethod · 0.80

Tested by

no test coverage detected