View Issue Details

IDProjectCategoryView StatusLast Update
0025188LazarusDebuggerpublic2013-10-14 13:45
ReporterDenis VolodarskyAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86OSWindowsOS Version7
Product VersionProduct Build 
Target Version1.4Fixed in Version1.3 (SVN) 
Summary0025188: [patch] FpDbgDwarf. Some log messages missed during LoadAbbrevs
DescriptionFpDbgDwarf.pas:

Looks like LoadAbbrevs in TDwarfAbbrevList.Create cannot DebugLn anything because FVerbose is set after constructor.
Tagsfpdebug
Fixed in Revision43247
LazTarget1.4
WidgetsetWin32/Win64
Attached Files
  • fpdbgdwarf.pas.patch (1,558 bytes)
    Index: components/fpdebug/fpdbgdwarf.pas
    ===================================================================
    --- components/fpdebug/fpdbgdwarf.pas	(revision 43245)
    +++ components/fpdebug/fpdbgdwarf.pas	(working copy)
    @@ -164,7 +164,7 @@
         FVerbose: Boolean;
         procedure LoadAbbrevs(AnAbbrevDataPtr: Pointer);
       public
    -    constructor Create(AnAbbrData, AnAbbrDataEnd: Pointer; AnAbbrevOffset, AInfoLen: QWord);
    +    constructor Create(AnAbbrData, AnAbbrDataEnd: Pointer; AnAbbrevOffset, AInfoLen: QWord; AVerbose: boolean);
         destructor Destroy; override;
         {$IFDEF USE_ABBREV_TMAP}
         function FindLe128bFromPointer(AnAbbrevPtr: Pointer; out AData: TDwarfAbbrev{Pointer}): Pointer; reintroduce;
    @@ -1861,10 +1861,11 @@
       end;
     end;
     
    -constructor TDwarfAbbrevList.Create(AnAbbrData, AnAbbrDataEnd: Pointer; AnAbbrevOffset,
    -  AInfoLen: QWord);
    +constructor TDwarfAbbrevList.Create(AnAbbrData, AnAbbrDataEnd: Pointer;
    +  AnAbbrevOffset, AInfoLen: QWord; AVerbose: boolean);
     begin
       inherited Create;
    +  FVerbose := AVerbose;
       FAbbrDataEnd := AnAbbrDataEnd;
       {$IFDEF USE_ABBREV_TMAP}
       FMap := TMap.Create(itu4, SizeOf(TDwarfAbbrev));
    @@ -3362,8 +3363,7 @@
     
       FAbbrevList := TDwarfAbbrevList.Create(FOwner.FSections[dsAbbrev].RawData,
         FOwner.FSections[dsAbbrev].RawData + FOwner.FSections[dsAbbrev].Size,
    -    FAbbrevOffset, FLength);
    -  FAbbrevList.FVerbose := FVerbose;
    +    FAbbrevOffset, FLength, FVerbose);
     
       // use internally 64 bit target pointer
       FAddressMap := TMap.Create(itu8, SizeOf(TDwarfAddressInfo));
    
    fpdbgdwarf.pas.patch (1,558 bytes)

Activities

Denis Volodarsky

2013-10-14 12:51

reporter  

fpdbgdwarf.pas.patch (1,558 bytes)
Index: components/fpdebug/fpdbgdwarf.pas
===================================================================
--- components/fpdebug/fpdbgdwarf.pas	(revision 43245)
+++ components/fpdebug/fpdbgdwarf.pas	(working copy)
@@ -164,7 +164,7 @@
     FVerbose: Boolean;
     procedure LoadAbbrevs(AnAbbrevDataPtr: Pointer);
   public
-    constructor Create(AnAbbrData, AnAbbrDataEnd: Pointer; AnAbbrevOffset, AInfoLen: QWord);
+    constructor Create(AnAbbrData, AnAbbrDataEnd: Pointer; AnAbbrevOffset, AInfoLen: QWord; AVerbose: boolean);
     destructor Destroy; override;
     {$IFDEF USE_ABBREV_TMAP}
     function FindLe128bFromPointer(AnAbbrevPtr: Pointer; out AData: TDwarfAbbrev{Pointer}): Pointer; reintroduce;
@@ -1861,10 +1861,11 @@
   end;
 end;
 
-constructor TDwarfAbbrevList.Create(AnAbbrData, AnAbbrDataEnd: Pointer; AnAbbrevOffset,
-  AInfoLen: QWord);
+constructor TDwarfAbbrevList.Create(AnAbbrData, AnAbbrDataEnd: Pointer;
+  AnAbbrevOffset, AInfoLen: QWord; AVerbose: boolean);
 begin
   inherited Create;
+  FVerbose := AVerbose;
   FAbbrDataEnd := AnAbbrDataEnd;
   {$IFDEF USE_ABBREV_TMAP}
   FMap := TMap.Create(itu4, SizeOf(TDwarfAbbrev));
@@ -3362,8 +3363,7 @@
 
   FAbbrevList := TDwarfAbbrevList.Create(FOwner.FSections[dsAbbrev].RawData,
     FOwner.FSections[dsAbbrev].RawData + FOwner.FSections[dsAbbrev].Size,
-    FAbbrevOffset, FLength);
-  FAbbrevList.FVerbose := FVerbose;
+    FAbbrevOffset, FLength, FVerbose);
 
   // use internally 64 bit target pointer
   FAddressMap := TMap.Create(itu8, SizeOf(TDwarfAddressInfo));
fpdbgdwarf.pas.patch (1,558 bytes)

Martin Friebe

2013-10-14 13:35

manager   ~0070812

Applied a different solution.

I dropped "FVerbose" entirely from this object. The output is now controlled by the LazLogger settings.

The remaining FVerbose will be dropped later.

Denis Volodarsky

2013-10-14 13:45

reporter   ~0070813

Thanks

Issue History

Date Modified Username Field Change
2013-10-14 12:51 Denis Volodarsky New Issue
2013-10-14 12:51 Denis Volodarsky Status new => assigned
2013-10-14 12:51 Denis Volodarsky Assigned To => Martin Friebe
2013-10-14 12:51 Denis Volodarsky File Added: fpdbgdwarf.pas.patch
2013-10-14 12:52 Denis Volodarsky Tag Attached: fpdebug
2013-10-14 13:35 Martin Friebe Fixed in Revision => 43247
2013-10-14 13:35 Martin Friebe LazTarget => 1.4
2013-10-14 13:35 Martin Friebe Note Added: 0070812
2013-10-14 13:35 Martin Friebe Status assigned => resolved
2013-10-14 13:35 Martin Friebe Fixed in Version => 1.3 (SVN)
2013-10-14 13:35 Martin Friebe Resolution open => fixed
2013-10-14 13:35 Martin Friebe Target Version => 1.4
2013-10-14 13:45 Denis Volodarsky Note Added: 0070813
2013-10-14 13:45 Denis Volodarsky Status resolved => closed