> Finally, effectively, memcheck knows where a ptr points
> (if the ptr is valid).
> So, it should be possible to write a gdb command (probably difficult to
> do, the gdb macro language is not very powerful) or a python extension
> to do a more intelligent get_vbits which would use
>    the type info known by gdb
>   and/or
>    monitor v.info location <address>
> to have an idea about the size of the block.
> and then do the correct monitor get_vbits command.
> Anybody volunteering ?
> We could add a file with 'various valgrind related gdb python extension'
> as part of the Valgrind distribution.

I'm of course ignorant about how memcheck works, but if it checks for 
out-of-bounds accesses, by knowing the size of each allocation (by 
wrapping malloc or so), wouldn't it be possible for valgrind to pinpoint 
the error directly, instead of having to recur to gdb?

I mean, if valgrind is able to signal with 0 or 1 if a byte was 
initialized (monitor get_vbits) then it should be able to tell the user 
which variable was not initialized?

Unless it works on the memory space level, not on the variable level... OK.

-- 
João M. S. Silva

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to