This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 6/6] gdbserver build-id attribute generator
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Aleksandar Ristovski <aristovski at qnx dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 29 Mar 2013 14:25:21 +0100
- Subject: Re: [patch 6/6] gdbserver build-id attribute generator
- References: <51278984 dot 3070208 at qnx dot com> <20130310210843 dot GG21130 at host2 dot jankratochvil dot net> <514C56D4 dot 1060906 at qnx dot com> <20130326204157 dot GC12291 at host2 dot jankratochvil dot net> <51530465 dot 30503 at qnx dot com> <20130327145028 dot GA17905 at host2 dot jankratochvil dot net> <515353CF dot 40601 at qnx dot com> <5154ADD2 dot 9040206 at qnx dot com>
On Thu, 28 Mar 2013 21:53:38 +0100, Aleksandar Ristovski wrote:
> 2) lrfind_mapping_entry can not check for vaddr + offset as offset
> is file offset, and for some shared objects this will not match even
> though the vaddr of the entry with zero offset is valid.
This is not yet a new review but:
When it does not match? ELF is designed so that each segment can be placed
arbitrarily but this code is Linux specific and Linux guarantees all segments
will be placed in memory with the same displacement against the file.
So in Linux file offset vs. memory offset is the same.
> Stepping through code now shows some of the things you couldn't see,
> like e.g. why is there so->build_id, and where is it being set (you
> couldn't see it being set before as qXfer_library was broken).
There was also a mistake by me I did not notice it.
Thanks,
Jan