Don't print internal errors when image base resolution fails, this can happen on mac since platform dylibs don't actually exist on disk. Closes #217.
This commit is contained in:
parent
6cec10601e
commit
a32e22aa44
@ -78,7 +78,9 @@ namespace detail {
|
||||
- reinterpret_cast<std::uintptr_t>(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<std::uintptr_t>(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<std::uintptr_t>(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());
|
||||
|
||||
@ -83,6 +83,8 @@ namespace detail {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Symbol resolution code should probably handle when object addresses are 0
|
||||
|
||||
std::vector<stacktrace_frame> resolve_frames(const std::vector<object_frame>& frames) {
|
||||
#if defined(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) && defined(CPPTRACE_GET_SYMBOLS_WITH_DBGHELP)
|
||||
std::vector<stacktrace_frame> trace = libdwarf::resolve_frames(frames);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user