dwarf_find_proc_info uses dl_iterate_phdrs, which iterates throught the caller's
.so headers. This will not work for remote unwinding as the process being
unwound is not the process that is calling the function.
dwarf_find_proc_info() is for internal use for the local process only, and it's
not supposed to be referenced from outside libunwind proper. We won't get any
good from using it.
If we're to support similar functionality (but see comments in bug 3070), we'd
probably have to export some find_proc_info entry point including a
need_unwind_info argument, or perhaps provide some default remote-compatible
implementation of find_proc_info, put_unwind_info et al by peeking at
unw_local_addr_space at the time we create our accessors data structure which we
then use to create the remote address space in
lib::unwind::StackTraceCreator::unwind_setup, and then get the default entry
points be wrappers that distinguish between local and remote address spaces and
Alternately, we might implement and export additional remote-friendly entry
points in the libunwind dwarf machinery to enable that function to use it directly.
This is not a bug. Using dwarf_find_proc_info for the wrong purpose was the
bug. See the patch in bug 3070 for more details.