From: Julian S. <js...@ac...> - 2009-02-19 14:50:18
|
> AFAIK, Julian recently added some functions to get at variable name for > a given stack address. You need it the other way around: get information > about number of parameter and types, and how to access them. Yes, that information (parameter names and types) is definitely in the Dwarf3, and the new reader I did (readdwarf3.c) could probably be extended to collect it. Unfortunately readdwarf3.c is what you could call a complicated nightmare, so it might not be easy to make the extension. Certainly studying the Dwarf3 spec would be helpful. Another important question is to understand precisely what information you do need. I imagine it will be the locations of all parameters for the code addresses which are the entry points of functions. At the moment readdwarf3.c throws away information about variables that are in registers -- it only records info on variables that are in memory. The reason is that this was not required for the initial functionality (the exp-ptrcheck tool and to a lesser extent, Helgrind), and so that is definitely one thing that would need to be fixed. (Since on most platforms other than x86, at least some of the arguments are passed in registers.) J |