|
From: Steven Stewart-G. <sst...@my...> - 2015-08-14 13:30:54
|
Can I integrate my program's reimplemented execve with Valgrind? Hello, Is it possible to integrate a reimplemented execve with Valgrind? I am implementing an Linux + GLibc emulator for Windows programs and so I have to reimplement execve myself (see https://gitlab.com/sstewartgallus/Sandbox-Libc/blob/master/kernel/src/main.c#L330.) Unfortunately, this means I also overwrite Valgrind's code itself and so Valgrind does not work for those processes. Is it possible to integrate with Valgrind itself and avoid this problem? Shouldn't qemu-user and user-mode Linux have also run into these problems? Thank you, Steven Stewart-Gallus |
|
From: John R. <jr...@bi...> - 2015-08-14 14:48:53
|
> Can I integrate my program's reimplemented execve with Valgrind? Call it 'execve', put it in a shared library, then change the filename of the shared library where valgrind expects to find execve from "glibc" to the name of your .so. |
|
From: Tom H. <to...@co...> - 2015-08-14 15:04:14
|
On 14/08/15 15:48, John Reiser wrote: >> Can I integrate my program's reimplemented execve with Valgrind? > > Call it 'execve', put it in a shared library, then change the filename > of the shared library where valgrind expects to find execve from "glibc" > to the name of your .so. Except that valgrind traps the system call, not the library function ;-) Tom -- Tom Hughes (to...@co...) http://compton.nu/ |