MCPcopy Create free account
hub / github.com/bloomberg/pystack / dwarfGetScopes

Method dwarfGetScopes

src/pystack/_pystack/unwinder.cpp:181–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181std::pair<int, AbstractUnwinder::Scopes>
182AbstractUnwinder::dwarfGetScopes(Dwarf_Die* cudie, Dwarf_Addr pc) const
183{
184 const auto elem = d_dwarf_getscopes_cache.find(pc);
185 if (elem == d_dwarf_getscopes_cache.cend()) {
186 Dwarf_Die* _scopes = nullptr;
187 int nscopes = dwarf_getscopes(cudie, pc, &_scopes);
188 auto pair = std::make_pair(nscopes, Scopes(_scopes, std::free));
189 d_dwarf_getscopes_cache.emplace(pc, pair);
190 return pair;
191 }
192 return elem->second;
193}
194
195AbstractUnwinder::StatusCode
196AbstractUnwinder::gatherInlineFrames(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected