DWARF debug line info (lnfodwrf.pp) is broken
Original Reporter info from Mantis: dezlov
-
Reporter name: Denis Kozlov
Original Reporter info from Mantis: dezlov
- Reporter name: Denis Kozlov
Description:
This is a follow up from a recently fixed STABS bug (lineinfo.pp):
http://bugs.freepascal.org/view.php?id=13518
DWARF debug line info (lnfodwrf.pp) seems to be broken in several ways.
-
The static "dwarferr" variable disables the whole unit on the first failure to read debug exe section, e.g. when address results in an external library which doesn't have debug info. Same type of issue as in the recently closed STABS bug.
-
The back trace only produces line info for the first address (without function name), and nothing for the rest of lines. This is even if the above problem is fixed.
Attached below in Additional Information section is a comparison of back traces between DWARF (lnfodwrf.pp) and fixed STABS (lineinfo.pp). Project was tested with several debug info types, i.e.: Dwarf with sets, Dwarf2, Dwarf3, Stabs. Using a slightly modified version of the example project from above mentioned STABS bug.
Additional information:
Back trace using DWARF:
===========================================================
$00423E0A line 78 of unit1.pas
$00504D4E
$0051C1FF
$0051C8FF
$0051C11A
$0040AE26
$004F8DFE
$00542275
$004D1E2A
$00547B25
$75B76238
$75B768EA
$75B7CD1A
$75B7CD81
$70E44601
$70E44663
$70E444ED
===========================================================
Back trace using STABS:
===========================================================
$00423E0A TFORM1__BUTTON2CLICK, line 78 of unit1.pas
$00504D4E TCONTROL__CLICK, line 2711 of ./include/control.inc
$0051C1FF TBUTTONCONTROL__CLICK, line 54 of ./include/buttoncontrol.inc
$0051C8FF TCUSTOMBUTTON__CLICK, line 169 of ./include/buttons.inc
$0051C11A TBUTTONCONTROL__WMDEFAULTCLICKED, line 20 of ./include/buttoncontrol.inc
$0040AE26
$004F8DFE TWINCONTROL__WNDPROC, line 5326 of ./include/wincontrol.inc
$00542275 DELIVERMESSAGE, line 112 of lclmessageglue.pas
$004D1E2A WINDOWPROC, line 2480 of ./win32/win32callback.inc
$00547B25 CUSTOMFORMWNDPROC, line 395 of ./win32/win32wsforms.pp
$75B76238
$75B768EA
$75B7CD1A
$75B7CD81
$70E44601
$70E44663
$70E444ED
===========================================================
Mantis conversion info:
- Mantis ID: 28283
- Platform: Windows
- Fixed in version: 3.1.1
- Fixed in revision: 32919 (#9225ff32)
- Monitored by: » dezlov (Denis Kozlov)
- Target version: 3.0.2