mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-14 14:19:08 +02:00
ide: use debugger SrcFullName record when available
git-svn-id: trunk@22961 -
This commit is contained in:
parent
378fa711b4
commit
4212ad71e2
@ -1547,7 +1547,7 @@ procedure TDebugManager.DebuggerCurrentLine(Sender: TObject; const ALocation: TD
|
|||||||
// -> show the current execution line in editor
|
// -> show the current execution line in editor
|
||||||
// if SrcLine < 1 then no source is available
|
// if SrcLine < 1 then no source is available
|
||||||
var
|
var
|
||||||
SrcFile: String;
|
SrcFile, SrcFullName: String;
|
||||||
NewSource: TCodeBuffer;
|
NewSource: TCodeBuffer;
|
||||||
Editor: TSourceEditor;
|
Editor: TSourceEditor;
|
||||||
SrcLine: Integer;
|
SrcLine: Integer;
|
||||||
@ -1560,6 +1560,7 @@ begin
|
|||||||
|
|
||||||
FCurrentLocation := ALocation;
|
FCurrentLocation := ALocation;
|
||||||
SrcFile := ALocation.SrcFile;
|
SrcFile := ALocation.SrcFile;
|
||||||
|
SrcFullName := ALocation.SrcFullName;
|
||||||
SrcLine := ALocation.SrcLine;
|
SrcLine := ALocation.SrcLine;
|
||||||
|
|
||||||
if SrcLine < 1
|
if SrcLine < 1
|
||||||
@ -1573,6 +1574,7 @@ begin
|
|||||||
then begin
|
then begin
|
||||||
SrcLine := StackEntry.Line;
|
SrcLine := StackEntry.Line;
|
||||||
SrcFile := StackEntry.Source;
|
SrcFile := StackEntry.Source;
|
||||||
|
SrcFullName := StackEntry.FullFileName;
|
||||||
StackEntry.Current := True;
|
StackEntry.Current := True;
|
||||||
Break;
|
Break;
|
||||||
end;
|
end;
|
||||||
@ -1591,13 +1593,17 @@ begin
|
|||||||
if SrcLine < 1 then Exit;
|
if SrcLine < 1 then Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if not GetFullFilename(SrcFile, true) then exit;
|
if (SrcFullName = '') or not GetFullFilename(SrcFullName, False) then
|
||||||
|
begin
|
||||||
|
SrcFullName := SrcFile;
|
||||||
|
if not GetFullFilename(SrcFullName, true) then exit;
|
||||||
|
end;
|
||||||
|
|
||||||
NewSource := CodeToolBoss.LoadFile(SrcFile, true, false);
|
NewSource := CodeToolBoss.LoadFile(SrcFullName, true, false);
|
||||||
if NewSource = nil
|
if NewSource = nil
|
||||||
then begin
|
then begin
|
||||||
MessageDlg(lisDebugUnableToLoadFile,
|
MessageDlg(lisDebugUnableToLoadFile,
|
||||||
Format(lisDebugUnableToLoadFile2, ['"', SrcFile, '"']),
|
Format(lisDebugUnableToLoadFile2, ['"', SrcFullName, '"']),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel],0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user