| 149 | } |
| 150 | |
| 151 | Ref<Symbol> SharedCacheObjCProcessor::GetSymbol(uint64_t address) |
| 152 | { |
| 153 | if (const auto symbol = m_data->GetSymbolByAddress(address)) |
| 154 | return symbol; |
| 155 | |
| 156 | const auto controller = DSC::SharedCacheController::FromView(*m_data); |
| 157 | if (!controller) |
| 158 | return nullptr; |
| 159 | |
| 160 | // No existing symbol located, try and search through the symbols of the cache. |
| 161 | auto cacheSymbol = controller->GetCache().GetSymbolAt(address); |
| 162 | if (!cacheSymbol.has_value()) |
| 163 | return nullptr; |
| 164 | |
| 165 | // Define the new symbol! |
| 166 | // While the method is "getting a symbol" and not applying it to the view, currently this is the more effective |
| 167 | // approach than monitoring every usage of this function to make sure they also define the symbol. |
| 168 | Ref<Symbol> symbol(new Symbol(cacheSymbol->type, cacheSymbol->name, address)); |
| 169 | m_data->DefineAutoSymbol(symbol); |
| 170 | return symbol; |
| 171 | } |
| 172 | |
| 173 | Ref<Section> SharedCacheObjCProcessor::GetSectionWithName(const char *sectionName) |
| 174 | { |
nothing calls this directly
no test coverage detected