mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 13:38:00 +02:00
Debugger: Jump properly from call stack to include files. Issue #31755.
git-svn-id: trunk@55155 -
This commit is contained in:
parent
55ab2098f4
commit
4d212f5d65
@ -354,6 +354,7 @@ procedure TDebuggerDlg.JumpToUnitSource(AnUnitInfo: TDebuggerUnitInfo; ALine: In
|
||||
var
|
||||
Filename: String;
|
||||
ok: Boolean;
|
||||
JumpFlags: TJumpToCodePosFlags;
|
||||
begin
|
||||
if AnUnitInfo = nil then exit;
|
||||
debugln(DBG_LOCATION_INFO, ['JumpToUnitSource AnUnitInfo=', AnUnitInfo.DebugText ]);
|
||||
@ -367,14 +368,16 @@ begin
|
||||
if DebugBoss.GetFullFilename(AnUnitInfo, Filename, False, False) then begin
|
||||
debugln(DBG_LOCATION_INFO, ['JumpToUnitSource Filename=', Filename]);
|
||||
ok := false;
|
||||
if ALine <= 0 then ALine := AnUnitInfo.SrcLine;
|
||||
JumpFlags := [jfAddJumpPoint, jfFocusEditor, jfMarkLine, jfMapLineFromDebug, jfSearchVirtualFullPath];
|
||||
if ALine <= 0 then
|
||||
ALine := AnUnitInfo.SrcLine;
|
||||
if FilenameIsAbsolute(Filename) then
|
||||
ok := MainIDEInterface.DoJumpToSourcePosition(Filename, 0, ALine, 0,
|
||||
[jfAddJumpPoint, jfFocusEditor, jfMarkLine, jfMapLineFromDebug, jfSearchVirtualFullPath]
|
||||
) = mrOK;
|
||||
ok := MainIDEInterface.DoJumpToSourcePosition(Filename, 0, ALine, 0, JumpFlags) = mrOK;
|
||||
if not ok then
|
||||
MainIDEInterface.DoJumpToSourcePosition(Filename, 0, ALine, 0,
|
||||
[jfDoNotExpandFilename, jfAddJumpPoint, jfFocusEditor, jfMarkLine, jfMapLineFromDebug, jfSearchVirtualFullPath]);
|
||||
begin
|
||||
DebugBoss.GetFullFilename(AnUnitInfo, Filename, True, True);
|
||||
MainIDEInterface.DoJumpToSourcePosition(Filename, 0, ALine, 0, JumpFlags+[jfDoNotExpandFilename]);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
DebugBoss.UnLockCommandProcessing;
|
||||
|
Loading…
Reference in New Issue
Block a user