https://sourceware.org/bugzilla/show_bug.cgi?id=23652

            Bug ID: 23652
           Summary: addr2line finds and parses external debug information
                    but does not use the result for its output
           Product: binutils
           Version: 2.32 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: guillaume at morinfr dot org
  Target Milestone: ---

Created attachment 11244
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11244&action=edit
patch

addr2line calls _bfd_dwarf2_find_nearest_line() which then calls
_bfd_dwarf2_slurp_debug_info().  _bfd_dwarf2_slurp_debug_info() diligently
finds and parses external debug files if necessary.  

However the calling function (_bfd_elf_find_nearest_line()) does not pass the
resulting dwarf_debug2 stash back to _bfd_elf_find_function() for printing.

The attached patch changes that by
1) passing the stash as an new argument bfd_elf_find_function() (dwarf_debug2
is not exposed outside of dwarf2.c so this stays as a void **)
2) looking for the corresponding section in dwarf2_debug if provided

I am not familiar with the binutils codebase so it might not be the best (or
right) solution in all cases but I hope this helps demonstrate the problem and
a potential solution.

Thank you!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to