Re: [patch 6/6] gdbserver build-id attribute generator

Jan Kratochvil
2013-03-29T13:25:40Z

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