mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 05:02:25 +02:00
clean up hint
git-svn-id: trunk@41885 -
This commit is contained in:
parent
f7a0b09e98
commit
8cc06e0b18
@ -9,7 +9,7 @@ interface
|
||||
|
||||
function OpenSymbolFile(AFileName: string): boolean;
|
||||
procedure CloseSymbolFile;
|
||||
function GetLineInfo(addr:ptruint;var func,source:string;var line:longint) : boolean;
|
||||
function GetLineInfo(addr:ptruint; out func,source:string; out line:longint) : boolean;
|
||||
|
||||
implementation
|
||||
|
||||
@ -162,7 +162,6 @@ end;
|
||||
function ReadNext() : Longint; inline;
|
||||
var
|
||||
bytesread : SizeInt;
|
||||
b : Byte;
|
||||
begin
|
||||
ReadNext := -1;
|
||||
if EBufPos >= EBufCnt then begin
|
||||
@ -909,7 +908,7 @@ begin
|
||||
CloseExeFile(e);
|
||||
end;
|
||||
|
||||
function GetLineInfo(addr: ptruint; var func, source: string; var line: longint): boolean;
|
||||
function GetLineInfo(addr: ptruint; out func, source: string; out line: longint): boolean;
|
||||
begin
|
||||
Result := False;
|
||||
if HasDwarf then
|
||||
|
@ -287,7 +287,7 @@ begin
|
||||
trace := TStackTrace(fItems[i]);
|
||||
nd := trvTraceInfo.Items.AddChildObject(nil, '+', trace);
|
||||
for j := 0 to trace.Count - 1 do begin
|
||||
trvTraceInfo.Items.AddChildObject(nd, '-', Pointer(j));
|
||||
trvTraceInfo.Items.AddChildObject(nd, '-', {%H-}Pointer(PtrInt(j)));
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -357,7 +357,7 @@ begin
|
||||
if not Assigned(nd) then Exit;
|
||||
if nd.Parent = nil then Exit;
|
||||
|
||||
idx := Integer(nd.Data);
|
||||
idx := Integer({%H-}PtrInt(nd.Data));
|
||||
trace := TStackTrace(nd.Parent.Data);
|
||||
if not Assigned(trace) or (idx >= trace.Count) then Exit;
|
||||
|
||||
|
@ -63,7 +63,7 @@ type
|
||||
// returns True, if information has been succesfully received, False otherwise
|
||||
// Fills LeakData record
|
||||
// if Traces is not nil, fill the list with TStackTrace object. User is responsible for freeing them
|
||||
function GetLeakInfo(var LeakData: TLeakStatus; var Traces: TList): Boolean; virtual; abstract;
|
||||
function GetLeakInfo(out LeakData: TLeakStatus; var Traces: TList): Boolean; virtual; abstract;
|
||||
function ResolveLeakInfo(AFileName: string; Traces: TList): Boolean; virtual; abstract;
|
||||
end;
|
||||
|
||||
@ -113,7 +113,7 @@ type
|
||||
constructor Create(const ATRCFile: string);
|
||||
constructor CreateFromTxt(const AText: string);
|
||||
destructor Destroy; override;
|
||||
function GetLeakInfo(var LeakData: TLeakStatus; var Traces: TList): Boolean; override;
|
||||
function GetLeakInfo(out LeakData: TLeakStatus; var Traces: TList): Boolean; override;
|
||||
function ResolveLeakInfo(AFileName: string; Traces: TList): Boolean; override;
|
||||
end;
|
||||
|
||||
@ -229,7 +229,7 @@ end;
|
||||
procedure ParseTraceLine(const s: string; var line: TStackLine);
|
||||
var
|
||||
i : integer;
|
||||
err : Integer;
|
||||
{%H-}err : Integer;
|
||||
hex : string;
|
||||
begin
|
||||
i := Pos('$', s);
|
||||
@ -396,7 +396,7 @@ end;
|
||||
procedure THeapTrcInfo.ParseStackTrace(trace: TStackTrace);
|
||||
var
|
||||
i : integer;
|
||||
err : integer;
|
||||
{%H-}err : integer;
|
||||
hex : string;
|
||||
NewLine: TStackLine;
|
||||
begin
|
||||
@ -438,7 +438,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function THeapTrcInfo.GetLeakInfo(var LeakData: TLeakStatus; var Traces: TList): Boolean;
|
||||
function THeapTrcInfo.GetLeakInfo(out LeakData: TLeakStatus; var Traces: TList): Boolean;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
@ -481,6 +481,7 @@ var
|
||||
SrcLine: longint;
|
||||
BadAddresses: TStackLines;
|
||||
begin
|
||||
Result := False;
|
||||
if not OpenSymbolFile(AFileName) then
|
||||
exit;
|
||||
BadAddresses := TStackLines.Create;
|
||||
@ -510,6 +511,7 @@ begin
|
||||
finally
|
||||
CloseSymbolFile;
|
||||
FreeAndNil(BadAddresses);
|
||||
Result := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user