| Anonymous | Login | Signup for a new account | 2013-05-25 14:04 CEST | ![]() |
| All Projects | FPC | Lazarus: Packages, Patches | Lazarus CCR | Mantis | fpGUI | fpcprojects: fpprofiler |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
| 0020344 | FPC | Compiler | public | 2011-09-25 12:09 | 2013-04-24 04:41 | ||||||||
| Reporter | Ludo Brands | ||||||||||||
| Assigned To | |||||||||||||
| Priority | normal | Severity | major | Reproducibility | always | ||||||||
| Status | new | Resolution | open | ||||||||||
| Platform | i386 | OS | Windows | OS Version | XP | ||||||||
| Product Version | 2.7.1 | Product Build | 18901 | ||||||||||
| Target Version | Fixed in Version | ||||||||||||
| Summary | 0020344: Internal linker corrupts object stab information when main program is compiled for dwarf. | ||||||||||||
| Description | When compiling a program with -gw2, stab information in linked in .o objects is lacking the necessary information to build the full path of the source file. Debuggers or other tools using debug info aren't able to find the source file. Using the external linker the problem does not occur. Comparing stab information it appears that the linker removes N_SourceFile stab information and issues only N_IncludeFile stab info omitting the base directory. | ||||||||||||
| Steps To Reproduce | Attached a small testcase. Put project1.pas and project2.pas in the same dir. Unit1.pas and unit2.inc in a completely different location. fpc.exe -B -gs -gl -FuPathToUnits project1.pas With GDB check "info func TEST". Test and Test2 are found in sources fpc.exe -gw2 -gl -FuPathToUnits project2.pas With GDB check "info func TEST". Test and Test2 are found but no sources fpc.exe -gw2 -gl -s -a -FuPathToUnits project2.pas ppas.bat With GDB check "info func TEST". Test and Test2 are found in sources | ||||||||||||
| Additional Information | Since recent lazarus trunk defaults now to dwarf, the issue pops up frequently when using RTL or LCL with stab debug info or when linking with gcc compiled objects or libraries (stabs is also default for gcc on windows). | ||||||||||||
| Tags | dwarf, linker, stab | ||||||||||||
| FPCOldBugId | |||||||||||||
| Fixed in Revision | |||||||||||||
| Attached Files | |||||||||||||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-09-25 12:09 | Ludo Brands | New Issue | |
| 2011-09-25 12:10 | Ludo Brands | File Added: dwarfstabmix.zip | |
| 2012-11-13 16:57 | Reinier Olislagers | Tag Attached: dwarf | |
| 2012-11-13 16:57 | Reinier Olislagers | Tag Attached: linker | |
| 2012-11-13 16:57 | Reinier Olislagers | Tag Attached: stab | |
| Main | My View | View Issues | Change Log | Roadmap |



