Fixes a number of issues with Linux attach:
-
Set xdi to zero for x86 _start relocation of libdynamorio.
-
Implement remote memset for .bss zeroing in elf_loader_map_phdrs(), fixing a crash in some builds such as Ubuntu20 release build.
-
Don't kill target if attach fails.
-
Fix crash if no pid passed.
-
Adds a useful error message on failure to look at ptrace permissions.
-
Adds a warning to use -skip_syscall if attach hangs.
-
Adds a test by porting the Windows client.attach test to Linux. Disables the mprotect syscall due to weird failures which need to be examined. Further tests of blocking syscalls and -skip_syscall are needed.
Re-enables the attach help message for drrun and the deployment docs.
Tested release build on Ubuntu20 where the .bss crash reproduced every run and is now gone.
Tested "ctest --repeat-until-fail 100 -V -R client.attach" on Ubuntu20 and on a Debian-ish system: no failures.
Issue: #38, #5054 (closed) Fixes #5054 (closed)