mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 04:26:21 +02:00
FpDebug: line/address lookup, fix uninitialized result for "file-found", used for pending breakpoints
This commit is contained in:
parent
8ee632a157
commit
c030c1af73
@ -2309,6 +2309,7 @@ function TDbgInstance.GetLineAddresses(AFileName: String; ALine: Cardinal;
|
|||||||
var
|
var
|
||||||
FoundLine: Integer;
|
FoundLine: Integer;
|
||||||
begin
|
begin
|
||||||
|
FLastLineAddressesFoundFile := False;
|
||||||
if Assigned(DbgInfo) and DbgInfo.HasInfo then
|
if Assigned(DbgInfo) and DbgInfo.HasInfo then
|
||||||
Result := DbgInfo.GetLineAddresses(AFileName, ALine, AResultList, AFindSibling, @FoundLine, @FLastLineAddressesFoundFile, AMaxSiblingDistance)
|
Result := DbgInfo.GetLineAddresses(AFileName, ALine, AResultList, AFindSibling, @FoundLine, @FLastLineAddressesFoundFile, AMaxSiblingDistance)
|
||||||
else
|
else
|
||||||
@ -2747,13 +2748,15 @@ function TDbgProcess.GetLineAddresses(AFileName: String; ALine: Cardinal;
|
|||||||
var
|
var
|
||||||
Lib: TDbgLibrary;
|
Lib: TDbgLibrary;
|
||||||
begin
|
begin
|
||||||
|
FLastLineAddressesFoundFile := False;
|
||||||
if ASymInstance <> nil then begin
|
if ASymInstance <> nil then begin
|
||||||
if ASymInstance = self then begin
|
if ASymInstance = self then begin
|
||||||
Result := inherited GetLineAddresses(AFileName, ALine, AResultList, AFindSibling, AMaxSiblingDistance);
|
Result := inherited GetLineAddresses(AFileName, ALine, AResultList, AFindSibling, AMaxSiblingDistance);
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
Result := ASymInstance.GetLineAddresses(AFileName, ALine, AResultList, AFindSibling, AMaxSiblingDistance);
|
Result := ASymInstance.GetLineAddresses(AFileName, ALine, AResultList, AFindSibling, AMaxSiblingDistance);
|
||||||
FLastLineAddressesFoundFile := ASymInstance.FLastLineAddressesFoundFile;
|
if ASymInstance.FLastLineAddressesFoundFile then
|
||||||
|
FLastLineAddressesFoundFile := True;
|
||||||
end;
|
end;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user