|
From: Christian C. <chr...@gm...> - 2015-01-12 01:45:38
|
Can anyone tell me if there's a valgrind tool for doing something? I'm trying to understand where a particular program variable's value(s) come from. For example, suppose some function has the statement "int x = read_from_some_outside_source()". And then the value of "x" gets passed around the program in various ways: variable assignments; parameter passing / return values; getting tucked away in some complex data structure store on the heap, etc. And then, in a remote part of that program, the value is actually read into some variable "y". I'm looking for a tool that can tell me that "y" (at least sometimes) ultimately gets its value from the source code location of "int x = read_from_some_outside_source()". This sounds a bit like the "Redux" tracer, described in a 2003 paper. But it's not clear if that tool is still available. It also sounds a bit like valgrind's "--trace-origins" option. But that option seems limited to tracking uninitialized values only, rather than even properly initialized values like I want. Thanks, Christian |