This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: eu-addr2line only searches by build-id?


On Mon, Jun 14, 2010 at 11:09:50AM -0700, Roland McGrath wrote:
> > 
> > Now I get:
> > open("tst2", O_RDONLY)                  = 3
> > open("/usr/lib/debug/.build-id/db/983b5986bc45464df0546768402dcad201e5b9.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
> > open("tst2.debug", O_RDONLY)            = 3
> 
> The same rule is being applied here, but since the debuglink name is
> "tst2.debug", that's the one being tried for the first debuginfo-path
> element.

And if I remove tst2.debug, it's actually tries those that I
expect.

> I wasn't aware that anyone ever set the debuglink name to the original name
> without .debug appended.  Obviously, that leads to finding the main file
> again.  It only ever uses the first existing file in the debuginfo-path.
> Perhaps you were expecting that it would open each such file and then
> ignore it when it has no DWARF in it.  But that's never how it's been.
> I'm not inclined to change that.

This has always been the way we do this in Debian since we started
using it (in 2003), and we never had any problem with this.
Adding an extention was never needed, because other tools don't look
in the same directory as the executable itself.  Only elfutils seems
to have a problem with this so far, because it has a different
search path.

I've also mailed about a simular problem using systemtap, which
basicly has the same issue, trying to open the same file twice.

One argument I have against adding an extention is that this might
result in a file conflict for debug files where a file conflict
doesn't exist for the non-debug files.

I'm also not sure why the default search path includes the path
where the executable is in.  It doesn't make sense to store those
debug files in something like /usr/bin/ to me.  And if it's not
installed, it's probably also not stripped.  So maybe changing
the default search path is an option?


Kurt


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]