|
From: Janne H. <jjh...@gm...> - 2006-10-05 19:57:22
|
> Easier would be writing a new tool from scratch.
>
> This probably sounds intimidating, but it shouldn't be. Use "nulgrind" (the
> tool that does nothing) as the starting point, and have it register callback
> functions for the "new_mem_stack" and "die_mem_stack" functions, which are
> called every time the SP changes. See VG_(track_{new,die}_mem_stack) in
> include/pub_tool_tooliface.h.
Thanks for the tip! I modified the nulgrind tool to track the SP extremes.
I'd like to be able to control my tool from inside my instrumented
application. I thought that a pretty easy interface for this would be
to register my own software interrupt handler. This way I could
control my tool with a couple of syscalls. Is there an easier way to
do this? I'd rather not make the instrumented app depend on valgrind
header files to make it easier to build.
Janne
|