[fpc-devel] Which unit does -gl parameter use?
Sven Barth
pascaldragon at googlemail.com
Mon Aug 23 11:03:43 CEST 2010
Am 23.08.2010 10:23, schrieb Graeme Geldenhuys:
> Hi,
>
> When you add the -gl (debug line info added to compiled executable)
> parameter to a project, which unit does it use to gather the debug
> information?
>
> LineInfo (via stab information) or LnfoDwrf (via dwarf information)?
>
>
> How do you toggle between the two? How do I know which one of the two
> is being used?
>
> At the moment, when I compile with -gl, then the GetLineInfo doesn't
> return any function name information. I then removed the -gl and
> explicitly added LnfoDwrf into my project uses clause (thinking that
> Stab info might be old and outdated), and still the function name
> information return by GetLineInfo was blank. I'm testing on a 64-bit
> Linux system.
>
>
According to the code in compiler\pmodules.pas (~659) (see below) the
compiler decides this depending on the used debug format. I might be
wrong, but for Linux this should be dwarf.
{ Lineinfo unit }
if (cs_use_lineinfo in current_settings.globalswitches) then begin
if (paratargetdbg = dbg_stabs) then
AddUnit('lineinfo')
else
AddUnit('lnfodwrf');
end;
Regards,
Sven
More information about the fpc-devel
mailing list