|
From: Josef W. <Jos...@gm...> - 2002-10-11 21:34:07
|
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=20 unknown location. The patch adds a "last_address" to the state machine to remember the last= =20 statement boundary. On reset, it#s initialised to the "invalid" address 0= =2E I=20 hope this is OK (or should we use "(Addr)-1" instead?). The patch now uses the "is_stmt" boolean correctly to only call addLineIn= fo() 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 |