|
From: Nicholas N. <nj...@cs...> - 2008-10-12 19:30:23
|
On Wed, 8 Oct 2008, Vadim Antonov wrote: > I'm a student of the Moscow State University, faculty of computational > mathematics and cybernetics. Now I'm working on valgrind's tool, which can > help to decompile programs. I want to analyze variables' values to > understand, which types these variables have (also I want to analyze > pointers, and I think, that I can do it. The main difference between simple > variables and pointers - their values. Pointers have very specific values). > But I have some troubles with valgrind's core. I can't understand, how to > get variables' values correctly. I'm trying to work with it by follow code: I assume by "variables" you mean variables in the programming language you are using, eg. C. However, Valgrind works at the binary level, so its analysis is on registers, memory locations, instructions, etc -- machine-level things, rather than programming language things. You can map from the machine level back to the language level using debugging information -- that's how the various tools report line numbers, for example. But mapping back to variables is harder. There might be some capability for it in Valgrind's libraries, but I'm not certain. Doing analysis that relies heavily on language-level information is difficult in Valgrind. Nick |