[Lazarus] RE : RE : RE : Generating line info

Ludo Brands ludo.brands at free.fr
Tue Sep 20 15:29:26 CEST 2011


> good point, and to add to it, AFAIK even gdb has some issues 
> with mixed 
> info, but I am not sure...
> 
I just found a problem with propably the internal fpc linker when mixing
stabs and dwarf. Stabs uses code N_SourceFile and N_IncludeFile to specify
filenames. N_SourceFile is or a full path or a base directory + relative
path. N_IncludeFile is or a full path or a relative path. When compiling the
main program for dwarf debugging symbols, the fpc linker removes all
N_SourceFile entries and leaves plenty of N_IncludeFile entries without base
directory. Obviously gdb can't find the source file when having only the
relative path and not the base directory.
Linking with the external linker doesn't create this problem.

Yes, I am aware of the -gostabsabsincludes compiler option that forces
absolute filenames. 

Ludo






More information about the Lazarus mailing list