| 155 | } |
| 156 | |
| 157 | std::string_view impl(uintptr_t addr) |
| 158 | { |
| 159 | const SymbolIndex & symbol_index = SymbolIndex::instance(); |
| 160 | |
| 161 | if (const auto * object = symbol_index.thisObject()) |
| 162 | { |
| 163 | auto dwarf_it = dwarfs.try_emplace(object->name, object->elf).first; |
| 164 | if (!std::filesystem::exists(object->name)) |
| 165 | return {}; |
| 166 | |
| 167 | Dwarf::LocationInfo location; |
| 168 | VectorWithMemoryTracking<Dwarf::SymbolizedFrame> frames; // NOTE: not used in FAST mode. |
| 169 | std::string_view result; |
| 170 | if (dwarf_it->second.findAddress(addr, location, Dwarf::LocationInfoMode::FAST, frames)) |
| 171 | { |
| 172 | setResult(result, location, frames); |
| 173 | return result; |
| 174 | } |
| 175 | return object->name; |
| 176 | } |
| 177 | return {}; |
| 178 | } |
| 179 | |
| 180 | std::string_view implCached(uintptr_t addr) |
| 181 | { |
no test coverage detected