public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug libdw/27805] New: libdwfl: Unable to extract source line information for RISC-V binary
@ 2021-04-30 12:31 n2knqf5ogu at bsogq dot anonbox.net
  2021-05-01 20:48 ` [Bug libdw/27805] " wilson at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: n2knqf5ogu at bsogq dot anonbox.net @ 2021-04-30 12:31 UTC (permalink / raw)
  To: elfutils-devel

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

            Bug ID: 27805
           Summary: libdwfl: Unable to extract source line information for
                    RISC-V binary
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libdw
          Assignee: unassigned at sourceware dot org
          Reporter: n2knqf5ogu at bsogq dot anonbox.net
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Created attachment 13416
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13416&action=edit
RV32IMC binary to reproduce the outlined issue

For the attached RV32IMC (i.e. RISC-V) binary, libdwfl from elfutlis 0.183 is
incapable of extracting source line information from provided DWARF debugging
information. This can be easily reproduced by comparing the behavior of
elfutils's addr2line with binutils's addr2line program.

With binutils:

  $ addr2line --version
  GNU addr2line (GNU Binutils) 2.35.2
  $ addr2line -e /tmp/elfutils-srcline-bug.elf 20400058
  /home/john/src/RIOT/examples/hello-world/main.c:26

With elfutils:

  $ addr2line --version
  addr2line (elfutils) 0.183
  $ addr2line -e /tmp/elfutils-srcline-bug.elf 20400058
  ??:0

Briefly debugging this, it seems to me that dwfl_module_getsrc seems to return
NULL and error out with DWARF_E_INVALID_OFFSET for this given binary.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-10-09 16:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 12:31 [Bug libdw/27805] New: libdwfl: Unable to extract source line information for RISC-V binary n2knqf5ogu at bsogq dot anonbox.net
2021-05-01 20:48 ` [Bug libdw/27805] " wilson at gcc dot gnu.org
2021-05-05 14:36 ` mark at klomp dot org
2021-05-05 15:42 ` wilson at gcc dot gnu.org
2021-05-05 15:59 ` wilson at gcc dot gnu.org
2021-05-06  9:43 ` mark at klomp dot org
2021-07-28 11:55 ` n2knqf5ogu at bsogq dot anonbox.net
2023-10-06 12:10 ` mark at klomp dot org
2023-10-09 16:15 ` mark at klomp dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).