diff --git a/src/platform/dwarf.hpp b/src/platform/dwarf.hpp index b1058d1..c574450 100644 --- a/src/platform/dwarf.hpp +++ b/src/platform/dwarf.hpp @@ -153,7 +153,7 @@ namespace libdwarf { } } - optional get_unsigned_attribute(Dwarf_Half attr_num) const { + optional 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); }); diff --git a/src/symbols/symbols_with_libdwarf.cpp b/src/symbols/symbols_with_libdwarf.cpp index 8b053e4..2414c43 100644 --- a/src/symbols/symbols_with_libdwarf.cpp +++ b/src/symbols/symbols_with_libdwarf.cpp @@ -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),