|
From: ISHIKAWA,chiaki <ish...@yk...> - 2015-04-24 04:23:15
|
Hi, On 2015/04/24 4:10, Philippe Waroquiers wrote: > On Fri, 2015-04-24 at 01:13 +0900, ISHIKAWA,chiaki wrote: > >> Can valgrind print value of used uninitialized memory location, say, >> something along the suggested manner below? > I am not a specialist in the way memcheck does all that, > but at first sight, I do not see major difficulties to implement that. > However, as far as I can see, it would imply to add a new PARAM to all > the error reporting helpers, which means the generated code will > grow and/or be less efficient. Growing the generated code just for > that seems not that attractive. I see. I thought it was simply adding some print code somewhere and knowledgeable person could do this in a matter of a day, but I did not realize there is this size/speed implications. > > As an alternative, when an error is encountered, you can debug > your program (using vgdb) at the moment of the error, and e.g. > examine the value of the variables and/or the definedness of > what is used in the conditional jump. I will try this approach with this particular issue I found lately. > Philippe Thank you for the pointers. Chiaki |