I want to develop a Frama-C-Plugin, where I get the values of the current statement.
With the help of this post Frama-C Plugin development: Getting result of value-analysis I was able to print the values of the statements, but Pointers were not shown the way I need it.
With the help of the comments, I was able to print the whole state (not only the variables of the statement).
Can I combine these two: Get the variables of the statement, but also with pointers dereferenced (the value)?
For example, printing a non-pointer after statement x=1
results in x -> {{ NULL -> {1} }}
, while printing a pointer, after a statement like *x=3, results in x -> {{ y -> {0} }}
because the 0 is the offset of the variable, but I want to get the value where the pointer points to, in the example 3.
The way I want it, would be to get something like that: x -> 3
.
Even better would be to get a tuple of (String varname, int value)
, so I can print it myself.