[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/17481] addr2line fails on some targets
From: |
vincent.riviere at freesbee dot fr |
Subject: |
[Bug binutils/17481] addr2line fails on some targets |
Date: |
Mon, 13 Oct 2014 19:18:11 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=17481
--- Comment #1 from Vincent Rivière <vincent.riviere at freesbee dot f
r> ---
This bug appeared in binutils 2.23. It worked fine in binutils 2.22.
I found the cause:
binutils/addr2line.c uses the new function
bfd_find_nearest_line_discriminator(). But that one is not implemented in a
ll
targets. The implementation defaults to
_bfd_generic_find_nearest_line_discriminator() which just returns FALSE.
In bfd/bfd-in2.h, the definition of BFD_JUMP_TABLE_SYMBOLS() uses directly
_bfd_generic_find_nearest_line_discriminator(). Then on major targets (i.e.
bfd/coff-i386.c) there is "#define _bfd_generic_find_nearest_line_discrimin
ator
coff_find_nearest_line_discriminator" to redirect to a different
implementation.
But on other targets (i.e. all a.out targets), that define is not present.
So
the default _bfd_generic_find_nearest_line_discriminator() is used, resulti
ng
in a completely broken addr2line.
The attached patch changes the implementation of
_bfd_generic_find_nearest_line_discriminator(). Now it delegates the job to
_bfd_find_nearest_line(), ignoring the new discriminator parameter. This wa
y,
addr2line still works on targets not yet aware of the discriminator.
That patch fixes the problem. Please consider committing it.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/17481] New: addr2line fails on some targets, vincent.riviere at freesbee dot fr, 2014/10/13
- [Bug binutils/17481] addr2line fails on some targets,
vincent.riviere at freesbee dot fr <=
- [Bug binutils/17481] addr2line fails on some targets, vincent.riviere at freesbee dot fr, 2014/10/13
- [Bug binutils/17481] addr2line fails on some targets, amodra at gmail dot com, 2014/10/14
- [Bug binutils/17481] addr2line fails on some targets, cvs-commit at gcc dot gnu.org, 2014/10/15
- [Bug binutils/17481] addr2line fails on some targets, amodra at gmail dot com, 2014/10/15
- [Bug binutils/17481] addr2line fails on some targets, vincent.riviere at freesbee dot fr, 2014/10/15
- [Bug binutils/17481] addr2line fails on some targets, cvs-commit at gcc dot gnu.org, 2014/10/28