mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 17:20:37 +02:00
leakview: simplified and comment
git-svn-id: trunk@44996 -
This commit is contained in:
parent
3d36d6f59e
commit
fc63515eb0
@ -330,24 +330,28 @@ begin
|
|||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
s := TrimLeft(SubStr);
|
s := TrimLeft(SubStr);
|
||||||
i := pos('#', s);
|
if s='' then exit;
|
||||||
if (i = 1) or (pos('~"#', s) = 1) then begin
|
|
||||||
|
if (LeftStr(s,3) = '~"#') then begin
|
||||||
// gdb
|
// gdb
|
||||||
|
// examples:
|
||||||
|
// ~"#0 DOHANDLEMOUSEACTION (this=0x14afae00, ANACTIONLIST=0x14a96af8,
|
||||||
|
// ANINFO=...) at synedit.pp:3000\n"
|
||||||
|
//
|
||||||
|
// #4 0x007489de in EXTTOOLEDITDLG_TEXTERNALTOOLMENUITEMS_$__LOAD$TCONFIGSTORAGE$$TMODALRESULT ()
|
||||||
|
i:=3;
|
||||||
Result := (i < Length(s)) and (s[i+1] in ['0'..'9']) and
|
Result := (i < Length(s)) and (s[i+1] in ['0'..'9']) and
|
||||||
( (pos(' at ', s) > 1) or (pos(' from ', s) > 1) );
|
( (pos(' at ', s) > 1) or (pos(' from ', s) > 1) );
|
||||||
Result := Result or CheckOnlyLineStart;
|
Result := Result or CheckOnlyLineStart;
|
||||||
exit;
|
end
|
||||||
end;
|
else if LeftStr(s,4) = '0000' then begin // leave 3 digits for pos
|
||||||
if copy(s,1,4) = '0000' then begin // leave 3 digits for pos
|
|
||||||
// mantis mangled gdb ?
|
// mantis mangled gdb ?
|
||||||
i := pos(':', s);
|
i := pos(':', s);
|
||||||
Result := ( ((i > 1) and (i < Length(s)) and (s[i+1] in ['0'..'9'])) or
|
Result := ( ((i > 1) and (i < Length(s)) and (s[i+1] in ['0'..'9'])) or
|
||||||
(pos(' in ', s) > 1) ) and
|
(pos(' in ', s) > 1) ) and
|
||||||
( (pos(' at ', s) > 1) or (pos(' from ', s) > 1) );
|
( (pos(' at ', s) > 1) or (pos(' from ', s) > 1) );
|
||||||
Result := Result or CheckOnlyLineStart;
|
Result := Result or CheckOnlyLineStart;
|
||||||
exit;
|
end else begin
|
||||||
end;
|
|
||||||
|
|
||||||
// heaptrc line?
|
// heaptrc line?
|
||||||
i := 1;
|
i := 1;
|
||||||
l := length(SubStr);
|
l := length(SubStr);
|
||||||
@ -358,8 +362,9 @@ begin
|
|||||||
((SubStr[i] in ['0'..'9']) or ((SubStr[i] in ['A'..'F'])) or ((SubStr[i] in ['a'..'f'])))
|
((SubStr[i] in ['0'..'9']) or ((SubStr[i] in ['A'..'F'])) or ((SubStr[i] in ['a'..'f'])))
|
||||||
do inc(i);
|
do inc(i);
|
||||||
if (i > l) or (SubStr[i] <> ' ') then exit;
|
if (i > l) or (SubStr[i] <> ' ') then exit;
|
||||||
Result := Pos('line', SubStr) > 0;
|
Result := (Pos('line', SubStr) > 0)
|
||||||
Result := Result or CheckOnlyLineStart;
|
or CheckOnlyLineStart;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function THeapTrcInfo.IsHeaderLine(const SubStr: string): Boolean;
|
function THeapTrcInfo.IsHeaderLine(const SubStr: string): Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user