Skip to content

Commit

Permalink
Don't assume libunwind can always find a function pointer.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed Oct 6, 2017
1 parent 50766d7 commit 57e164b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/debuginfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,8 @@ static void get_function_name_and_base(const object::ObjectFile *object, bool in
unw_proc_info_t pip;
if (unw_get_proc_info_by_ip(unw_local_addr_space, pointer, &pip, NULL) == 0) {
*saddr = (void*)pip.start_ip;
needs_saddr = false;
// Seems that libunwind may return NULL IP depending on what info it finds...
needs_saddr = (*saddr != nullptr);
}
#endif
#if defined(_OS_WINDOWS_) && defined(_CPU_X86_64_)
Expand Down

0 comments on commit 57e164b

Please sign in to comment.