[fpc-devel] FPC SVN 8427 : GDB/DWARF2 issues

Bruce Tulloch bruce at causal.com
Tue Sep 11 09:17:58 CEST 2007


I should note here that the strange anomalies I reported below do not
occur when using stabs instead of dwarf2.

That is, gdb knows the language is pascal regardless of the source file
location and it never shows the file name with any path prepended. Stabs
data also mangles the method symbol names to show their classes whereas
dwarf2 does not (indeed dwarf2 knows nothing about classes in gdb).

Cheers, Bruce.

Bruce Tulloch wrote:
> 
> The first strange thing to notice is that the current source file still
> has a path prepended (as reported by GDB) if the source file is not in
> the working directory (ie, the "/home/bruce/vc/src//" shown above).
> 
> The second strange thing is that gdb's "info source" reports
> 
>   Source language is minimal.
>   Compiled with DWARF 2 debugging format.
>   Does not include preprocessor macro info.
> 
> when viewing source which is in the current working directory but:
> 
>   Source language is pascal.
>   Compiled with unknown debugging format.
>   Does not include preprocessor macro info.
> 
> when viewing source which is located elsewhere. It seems gdb understands
> that it's reading DWARF2 but not that the language is pascal if the file
> is in the working directory and vice versa if the file is elsewhere.
> 
> So far these issues appear benign for our purposes here, but presumably
> they indicate something is still amiss?
> 
> Another clue may be complaints by readelf -wl which reports:
> 
> "Warning: The line info appears to be corrupt - the section is too small"
> 
> I hope this helps. We will feedback more as we discover stuff.
> 
> Cheers, Bruce.
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
> 



More information about the fpc-devel mailing list