Hi John,
Thanks for your inputs. I tried both --trace-signals=yes and strace options
indicated but i could not see any traces of signal sent reaching my_process.
I suspect if LD_PRELOAD itself did not happen with the following command to
my_process
LD_PRELOAD=./libfake.so valgrind ./my_process
Is there a different way to make sure that LD_PRELOAD done above is indeed
successful? I checked few online portals and i see /proc/<pid>/maps (pid of
my_process) and i see references to the libfake.so. Does this confirm that
LD_PRELOAD is indeed successful? Is there any other way to trace where the
signal is reaching?
ThanksHari
On Wednesday, February 28, 2018, 9:43:29 AM GMT+5:30, John Reiser
<jrei...@bitwagon.com> wrote:
> LD_PRELOAD=./libfake.so ./my_process --> runs fine and prints memory stats
>
> But,
>
> LD_PRELOAD=./libfake.so valgrind ./my_process --> doesnt print the memory
> stats
>
> From few online blogs, i understand that valgrind does forward any signals
>to the child process that it is running on but it doesnt seem to work here.
There is no parent-child relationship between valgrind and ./my_process.
Both valgrind and ./my_process run in the same address space as just one
process.
The inter-process communication would be extremely expensive if valgrind
and ./my_process did not share the same address space, and memcheck tracking
of each memory access would be difficult if there were 2 threads of control.
The command-line parameter "--trace-signals=yes" causes valgrind to report on
signals.
The Linux utility /usr/bin/strace also reports on signals. (Probably use
something like "strace -e trace=file" to reduce the syscalls that strace
reports;
in particular 'read' and 'write' are usually heavily used and ignorable.)
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users