Currently valgrind supports alt/dwz files, but only using build-id lookup. The altfile can also be relative to the debug file if not installed in the system wide build-id directory. The following patch supports this and is needed for writing small testcases that use debug dwz altfiles. Reproducible: Always
Created attachment 88552 [details] Handle debug alt dwz files that are relative to the debug file. Proposed patch. Would like someone to double check this works correctly with a debugserverpath.
On thing this patch fixes is the interpretation of the et_rel boolean argument to find_debug_file. The et_rel boolean just indicates whether a ET_REL file is allowed. But the implementation of find_debug_file seem to have misinterpreted as "is a relative path to a debug file allowed"? So find_debug_file should only pass this flag on to open_debug_file and not try to interpret it. find_debug_file then checks the file opened is or isn't an ET_REL file.
(In reply to Mark Wielaard from comment #1) > Proposed patch. Would like someone to double check this works correctly with > a debugserverpath. Looks OK to me: device: --773-- Arch and hwcaps: ARM, LittleEndian, ARMv7-vfp --773-- Page sizes: currently 4096, max supported 4096 --773-- Valgrind library directory: /data/local/Inst/lib/valgrind --773-- Reading syms from /data/local/bz2-arm-nosyms --773-- Using (POSSIBLY MISMATCHED) bz2-arm-nosyms on 192.168.2.99:1500 server: ~/VgTRUNK/merge$ ./valgrind-di-server valgrind-di-server started at Fri Sep 5 10:20:28 2014 (1) SessionID 1: open successful for "bz2-arm-nosyms" (1) SessionID 1: sent 6 frames, 0 MB (unz), 0 MB (z), ratio 1.56:1 (1) SessionID 1: closed
Thanks for testing I checked this in as valgrind svn r14464.
Plus a small followup patch to unbreak debain/ubuntu style setups as r14474.