diff --git a/src/binary/object.cpp b/src/binary/object.cpp index 7f4d524..594e5d2 100644 --- a/src/binary/object.cpp +++ b/src/binary/object.cpp @@ -78,7 +78,9 @@ namespace detail { - reinterpret_cast(info.dli_fbase) + base.unwrap_value(); } else { - base.drop_error(); + if(!should_absorb_trace_exceptions()) { + base.drop_error(); + } } } return frame; @@ -101,7 +103,9 @@ namespace detail { - reinterpret_cast(info.dli_fbase) + base.unwrap_value(); } else { - base.drop_error(); + if(!should_absorb_trace_exceptions()) { + base.drop_error(); + } } } return frame; @@ -146,7 +150,9 @@ namespace detail { - reinterpret_cast(handle) + base.unwrap_value(); } else { - base.drop_error(); + if(!should_absorb_trace_exceptions()) { + base.drop_error(); + } } } else { std::fprintf(stderr, "%s\n", std::system_error(GetLastError(), std::system_category()).what()); diff --git a/src/symbols/symbols_core.cpp b/src/symbols/symbols_core.cpp index ab7574d..7160c5d 100644 --- a/src/symbols/symbols_core.cpp +++ b/src/symbols/symbols_core.cpp @@ -83,6 +83,8 @@ namespace detail { } } + // TODO: Symbol resolution code should probably handle when object addresses are 0 + std::vector resolve_frames(const std::vector& frames) { #if defined(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) && defined(CPPTRACE_GET_SYMBOLS_WITH_DBGHELP) std::vector trace = libdwarf::resolve_frames(frames);