Minor fixes
This commit is contained in:
parent
7ffec7b3c0
commit
5bf66156cd
@ -153,7 +153,7 @@ namespace libdwarf {
|
||||
}
|
||||
}
|
||||
|
||||
optional<uint64_t> get_unsigned_attribute(Dwarf_Half attr_num) const {
|
||||
optional<Dwarf_Unsigned> get_unsigned_attribute(Dwarf_Half attr_num) const {
|
||||
Dwarf_Attribute attr;
|
||||
if(wrap(dwarf_attr, die, attr_num, &attr) == DW_DLV_OK) {
|
||||
auto attwrapper = raii_wrap(attr, [] (Dwarf_Attribute attr) { dwarf_dealloc_attribute(attr); });
|
||||
|
||||
@ -298,6 +298,7 @@ namespace libdwarf {
|
||||
return subprogram_symbol(spec, 0, dwversion);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
void get_inlines_info(
|
||||
@ -317,7 +318,7 @@ namespace libdwarf {
|
||||
const auto file = ""; // die.get_string_attribute(DW_AT_call_file);
|
||||
const auto line = die.get_unsigned_attribute(DW_AT_call_line);
|
||||
const auto col = die.get_unsigned_attribute(DW_AT_call_column);
|
||||
printf(" %s %s:%u:%u\n", name.c_str(), file, line.value_or(0), col.value_or(0));
|
||||
printf(" %s %s:%u:%u\n", name.c_str(), file, (unsigned)line.value_or(0), (unsigned)col.value_or(0));
|
||||
inlines.push_back(stacktrace_frame{
|
||||
0,
|
||||
(unsigned int)line.value_or(0),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user