|
From: Julian S. <js...@ac...> - 2012-12-07 09:54:30
|
> I am developing a new tool of valgrind, in which I want to print only > traces that belong to a specific global array. What I need to know is the > starting address, the size and the name of the array. > My idea is to read the dwarf debug info in order to take all the above > information which I know that is included into the .debug_info section. > My problem is that I can not read this information using the valgrinds > functions. Reading the stuff in .debug_info is a massive amount of hassle/work, and Valgrind already has code to do this. The exp-sgcheck tool is able to identify global and stack allocated arrays using Valgrind's Dwarf3 reader. Studying the exp-sgcheck sources would be a good place to start. J |