FreeBSD: fix reading debuginfo of the tool itself
commit6fdd59afb5e473b30e7ad1fbadcf9a397253fed4
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 23 Sep 2023 14:11:55 +0000 (23 16:11 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 23 Sep 2023 14:11:55 +0000 (23 16:11 +0200)
tree26aee56619c0f715c198f9f76bf7d16c37ddb065
parenteb0b07f4fc63fec057f1b59cce8cb308110a4552
FreeBSD: fix reading debuginfo of the tool itself

Not sure if this was ever functional since I started working on it,
but FreeBSD parse_procselfmaps doesn't handle the RW PT_LOAD
correctly. Also since FreeBSD was ignoring non-fixed RO PT_LOAD
mappings ML_(read_elf_object) didn't see the right number of
debuginfo mappings compared to the ELF header.

The code is fairly hacky and brute force.
NEWS
coregrind/m_aspacemgr/aspacemgr-linux.c
coregrind/m_debuginfo/debuginfo.c
coregrind/m_debuginfo/priv_storage.h
coregrind/m_debuginfo/readelf.c
include/pub_tool_aspacemgr.h