[Lazarus] RE : RE : Debug info for packages

Ludo Brands ludo.brands at free.fr
Fri Oct 7 19:43:10 CEST 2011


 
> It was, on 23/09/2011 11:07 by me, under the subject "Re: [Lazarus] 
> Spurious package rebuild", in reply to
> 
> > On 22/09/2011 19:36, cobines wrote:
> >> Ah, I see. It is not explicitly stated in lclbase.lpk 
> because it is 
> >> the default value now. But I open lclbase.lpk in IDE, in 
> Linking page 
> >> the debugging info is set to "Automatic (Dwarf with Sets(-gw 
> >> -godwarfsets))". So that must be it.
> >>
> >
> > Problem should be solved.
> > Automatic is now "-g", so options should match.
> 
> 


Found the problem:  Ide/compileroptions.pp line 1422

  GenerateDebugInfo :=
aXMLConfig.GetValue(p+'Debugging/GenerateDebugInfo/Value', false);
  UseLineInfoUnit :=
aXMLConfig.GetValue(p+'Debugging/UseLineInfoUnit/Value', true);
  UseHeaptrc := aXMLConfig.GetValue(p+'Debugging/UseHeaptrc/Value', false);
  UseValgrind := aXMLConfig.GetValue(p+'Debugging/UseValgrind/Value',
false);

  if aXMLConfig.GetValue(p+'Debugging/DebugInfoType/Value', '') = '' then
begin
    // upgrading old setting
    DebugInfoType := dsAuto;
    if GenerateDebugInfo then
      DebugInfoType := dsStabs;
    if UseLineInfoUnit or UseHeaptrc or UseValgrind then
      GenerateDebugInfo := True; // LineInfo implies debug info
    b := aXMLConfig.GetValue(p+'Debugging/GenerateDwarf/Value', false);
    if b then begin
      GenerateDebugInfo := True;    // The old setting implied this
      DebugInfoType := dsDwarf2Set; // explicit dwarf, upgrade to +set
    end;

UseLineInfoUnit is set to true if no xml data available and a few lines
further it says if UseLineInfoUnit or UseHeaptrc or UseValgrind then
GenerateDebugInfo := True;

So all packages that don't specify debug info are compiled with -g -gl. QED

Remains the question. How to change the package debug info without
configuring individual packages? This is making debug/release project
management a nightmare.

Ludo





More information about the Lazarus mailing list