Skip to content

Commit 0ef9d0e

Browse files
committed
Cleanup
1 parent dadba84 commit 0ef9d0e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/symbols/dwarf/dwarf_resolver.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ namespace libdwarf {
352352
// DW_AT_specification and DW_AT_abstract_origin
353353
auto it = namespace_prefix_cache.find(target_die.get_global_offset());
354354
if(it != namespace_prefix_cache.end()) {
355-
return std::string(it->second.data(), it->second.size());
355+
return std::string(it->second);
356356
}
357357
std::string prefix;
358358
find_die_namespace_prefix(cu_die, target_die.get_global_offset(), prefix);
@@ -373,8 +373,9 @@ namespace libdwarf {
373373
name = std::move(linkage_name);
374374
} else if(auto raw_name = die.get_string_attribute(DW_AT_name)) {
375375
// DW_AT_name is unqualified according to the DWARF standard
376-
// In cache_mode == speed we preprocess all the namespace prefixes
377-
// otherwise we have to reconstruct the namespace by walking the DWARF tree
376+
// In cache_mode == speed we preprocess all the namespace prefixes and a cache will hit in
377+
// get_die_namespace_prefix, otherwise hopefully we can use the prefix we collected while walking
378+
// and otherwise we'll have to re-walk from the cu_die to create the namespace prefix
378379
auto prefix = walked_prefix.has_value()
379380
? std::string(walked_prefix.unwrap())
380381
: get_die_namespace_prefix(cu_die, die);

0 commit comments

Comments
 (0)