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 Sun, Jun 13, 2010 at 06:14:28PM -0700, Roland McGrath wrote:
> What you've described really doesn't make any sense to me.
> Can you supply a binary file on which "eu-addr2line -e file"
> behaves as you are describing?

$ cat tst.c
int main()
{
        return 0;
}

$ gcc tst.c -o tst

Now I get:
open("tst", O_RDONLY)                   = 3
open("/usr/lib/debug/.build-id/db/983b5986bc45464df0546768402dcad201e5b9.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tst.debug", O_RDONLY)             = -1 ENOENT (No such file or directory)
open(".debug/tst.debug", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/home/kurt/t/tst.debug", O_RDONLY) = -1 ENOENT (No such file or directory)open("/home/kurt/t/.debug/tst.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/debug/home/kurt/t/tst.debug", O_RDONLY) = -1 ENOENT (No such file or directory)

$ cp tst tst1
$ objcopy --add-gnu-debuglink=tst1 tst1

Now I get:
open("tst1", O_RDONLY)                  = 3
open("/usr/lib/debug/.build-id/db/983b5986bc45464df0546768402dcad201e5b9.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tst1", O_RDONLY)                  = 3

While I was expecting something like:
tst1
/usr/lib/debug/.build-id/db/983b5986bc45464df0546768402dcad201e5b9.debug
.debug/tst1
/home/kurt/t/.debug/tst1
/usr/lib/debug/home/kurt/t/tst1

$ cp tst tst2
$ cp tst tst2.debug
$ objcopy --add-gnu-debuglink=tst2.debug tst2

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

I attached tst and tst1.


Kurt

Attachment: tst.obj
Description: Binary data

Attachment: tst1.obj
Description: Binary data


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