mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 13:20:18 +02:00
fixed searching for default debugger line
git-svn-id: trunk@4794 -
This commit is contained in:
parent
9b34313f6d
commit
8dfca459b1
@ -854,7 +854,7 @@ procedure TDebugManager.OnDebuggerCurrentLine(Sender: TObject;
|
|||||||
const ALocation: TDBGLocationRec);
|
const ALocation: TDBGLocationRec);
|
||||||
// debugger paused program due to pause or error
|
// debugger paused program due to pause or error
|
||||||
// -> 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: String;
|
||||||
NewSource: TCodeBuffer;
|
NewSource: TCodeBuffer;
|
||||||
@ -870,22 +870,22 @@ begin
|
|||||||
SrcLine:=ALocation.SrcLine;
|
SrcLine:=ALocation.SrcLine;
|
||||||
|
|
||||||
//TODO: Show assembler window if no source can be found.
|
//TODO: Show assembler window if no source can be found.
|
||||||
if SrcLine = -1
|
if SrcLine < 1 then begin
|
||||||
then begin
|
|
||||||
MessageDlg(lisExecutionPaused,
|
MessageDlg(lisExecutionPaused,
|
||||||
Format(lisExecutionPausedAdress, [#13#13, ALocation.Address, #13,
|
Format(lisExecutionPausedAdress, [#13#13, ALocation.Address, #13,
|
||||||
ALocation.FuncName, #13, ALocation.SrcFile, #13#13#13, #13]),
|
ALocation.FuncName, #13, ALocation.SrcFile, #13#13#13, #13]),
|
||||||
mtInformation, [mbOK],0);
|
mtInformation, [mbOK],0);
|
||||||
|
|
||||||
// jump to the deepest stack frame with debugging info
|
// jump to the deepest stack frame with debugging info
|
||||||
i:=FDebugger.CallStack.Count-1;
|
i:=0;
|
||||||
while (i>=0) do begin
|
while (i<FDebugger.CallStack.Count) do begin
|
||||||
StackEntry:=FDebugger.CallStack.Entries[i];
|
StackEntry:=FDebugger.CallStack.Entries[i];
|
||||||
if StackEntry.Line>0 then begin
|
if StackEntry.Line>0 then begin
|
||||||
SrcLine:=StackEntry.Line;
|
SrcLine:=StackEntry.Line;
|
||||||
SrcFile:=StackEntry.Source;
|
SrcFile:=StackEntry.Source;
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
|
inc(i);
|
||||||
end;
|
end;
|
||||||
if SrcLine<1 then
|
if SrcLine<1 then
|
||||||
Exit;
|
Exit;
|
||||||
@ -1575,6 +1575,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.64 2003/11/10 22:29:23 mattias
|
||||||
|
fixed searching for default debugger line
|
||||||
|
|
||||||
Revision 1.63 2003/10/16 23:54:27 marc
|
Revision 1.63 2003/10/16 23:54:27 marc
|
||||||
Implemented new gtk keyevent handling
|
Implemented new gtk keyevent handling
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user