|
From: John R. <jr...@bi...> - 2015-09-21 12:54:39
|
> For a simple example, just compare the results of ``strace date'' and ``valgrind --trace-syscalls=yes date'' on Linux. > > E.g., it records syscalls only related to Valgrind, like > sys_open ( 0x40244a0(/usr/local/lib/valgrind/vgpreload_core-amd64-linux.so) > sys_open ( 0x40249d8(/usr/local/lib/valgrind/vgpreload_memcheck-amd64-linux.so) > > It also has other different operations like memory/signal/file operations, sysctl, etc. > > How to tell which are extra ones caused by Valgrind, which are not? A filename which contains "valgrind/vgpreload_<tool-name>-<arch-name>-<os-name>.so" gives a hint that syscalls (or calls to wrappers for syscalls) from such a file should be re-directed to the non-traced versions. Depending on the details of how the current non-interception operates, such re-direction could be done when processing pre-loaded libraries, or might require a dynamic check of the program counter for every syscall that is simulated. |