Re: [draft patch 0/6] Split FYI and some review notes

Aleksandar Ristovski
2013-03-15T15:39:47Z

On 13-03-10 05:07 PM, Jan Kratochvil wrote:
> get_hex_build_id must not be based on soname, moreover playing with realname
> on it, it is too fragile. It should be based on addresses, you know that l_ld
> is absolute address inside the library. So find maps/smaps entry containing
> l_ld, subtract its file offset from vaddr and you have the ELF header address.

Thinking about this, we have to do a real name on this as maps/smaps
contain name as requested initially, not pathname as resolved.

While we can determine entry that corresponds to the given l_ld, the
name sent to gdb needs to be realname as that is what gdb expects.