Walk subprogram children to handle lambdas better and also cast better

This commit is contained in:
Jeremy 2023-11-15 21:30:11 -05:00
parent ab7e71f1b2
commit a518cd8874
No known key found for this signature in database
GPG Key ID: BE03111EB7ED6E2E

View File

@ -357,8 +357,8 @@ namespace libdwarf {
const auto col = die.get_unsigned_attribute(DW_AT_call_column);
inlines.push_back(stacktrace_frame{
0,
(unsigned int)line.value_or(0),
(unsigned int)col.value_or(0),
{static_cast<std::uint32_t>(line.value_or(0))},
{static_cast<std::uint32_t>(col.value_or(0))},
file,
name,
true
@ -464,6 +464,13 @@ namespace libdwarf {
for(auto range : ranges_vec) {
vec.push_back({ die.clone(), range.first, range.second });
}
// Walk children to get things like lambdas
// TODO: Somehow find a way to get better names here? For gcc it's just "operator()"
// On clang it's better
auto child = die.get_child();
if(child) {
preprocess_subprograms(child, dwversion, vec);
}
}
break;
case DW_TAG_namespace: