|
From: Julian S. <js...@ac...> - 2002-10-12 10:31:59
|
Thanks Josef, that's very excellent. I had heard many bug reports saying that the DWARF2 reader does not work very well, and so it seems like this fixes it. I will try and get it in a release soon. If you make any more bug fixes to this reader, please let me know ASAP. J On Friday 11 October 2002 10:33 pm, Josef Weidendorfer wrote: > Hi, > > I recently updated to Suse8.1 with GCC 3.2 and had a lot > of problems with cachegrind regarding DWARF2 debug info. > > Attached patch is for the Dwarf2 source line info reader; > For reading, a state machine is used reconstructing source line > info while running and reading (see DWARF2 specification, ch. 6.2). > The state machine was correct, but the calls to addLineInfo() > were wrong: It reported most of the times too small ranges > for source code statements, because it used only the diff of the last > state machine command instead of the diff to the last statement > boundary. Effect: Around 1/3 of all addresses with source line info got > unknown location. > The patch adds a "last_address" to the state machine to remember the last > statement boundary. On reset, it#s initialised to the "invalid" address 0. > I hope this is OK (or should we use "(Addr)-1" instead?). > The patch now uses the "is_stmt" boolean correctly to only call > addLineInfo() if there's a statement boundary (on x86, is_stmt most > probably is > always true...). > > Please apply both to 1.0.x branch and HEAD. > > Another problem: > Symbols like "_GLOBAL__I__ZNK10DirTreeMap9classNameEv" aren't demangled. > I need to look at this... > > Josef |