]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Allow valgrind to find debug info in a 'usr merge' setup.
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 1 Mar 2020 21:43:31 +0000 (22:43 +0100)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 1 Mar 2020 21:43:31 +0000 (22:43 +0100)
commitdb07db4c8706d17124a621a254bee1b6f08d2e1d
treeaddc45cb7877a8d653fa76c4ba1dfe6666b0d210
parent3a2711c659ac839934f13e0529e14d6c15325383
Allow valgrind to find debug info in a 'usr merge' setup.

On ubuntu 19.10, valgrind fails telling that it cannot find
the mandatory redirection for strlen in ld-linux-x86-64.so.2.

This is due to /bin being a symlink to usr/bin: ld is found
in /usr/lib/x86_64-linux-gnu/ld-2.30.so
but its debug info is
in /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.30.so

Without this patch, valgrind searches the debug info (a.o.)
in /usr/lib/debug/usr/lib/x86_64-linux-gnu/ld-2.30.so
so using the concatenation of  /usr/lib/debug
and /usr/lib/x86_64-linux-gnu/ld-2.30.so,
but the debug info is located at the concatenation of
/usr/lib/debug and /lib/x86_64-linux-gnu/ld-2.30.so
(so without the leading /usr).
Modify the debug info search so as to try with and without the /usr.

Patch derived from the patch done by Mathieu Trudel-Lapierre
to solve https://bugs.launchpad.net/ubuntu/+source/valgrind/+bug/1808508
coregrind/m_debuginfo/readelf.c