mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 01:39:19 +02:00
DBG: Fixed, evaluating watches in correct stackframe after exception
git-svn-id: trunk@32388 -
This commit is contained in:
parent
1e39ce6cf8
commit
4b91967012
@ -4300,14 +4300,19 @@ function TGDBMIDebuggerCommandExecute.ProcessStopped(const AParams: String;
|
|||||||
FTheDebugger.QueueExecuteUnlock;
|
FTheDebugger.QueueExecuteUnlock;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
//TODO, decide how much (if any) to run before asking the user
|
||||||
|
SetDebuggerState(dsPause); // after GetLocation => dsPause may run stack, watches etc
|
||||||
|
|
||||||
FTheDebugger.DoException(deInternal, AInfo.Name, Location.Address, ExceptionMessage, CanContinue);
|
FTheDebugger.DoException(deInternal, AInfo.Name, Location.Address, ExceptionMessage, CanContinue);
|
||||||
if CanContinue
|
if CanContinue
|
||||||
then begin
|
then begin
|
||||||
//ExecuteCommand('-exec-continue')
|
//ExecuteCommand('-exec-continue')
|
||||||
Result := True; // outer funciton result
|
Result := True; // outer funciton result
|
||||||
exit;
|
exit;
|
||||||
end
|
end;
|
||||||
else FTheDebugger.DoCurrent(Location);
|
|
||||||
|
//SetDebuggerState(dsPause); // after GetLocation => dsPause may run stack, watches etc
|
||||||
|
FTheDebugger.DoCurrent(Location);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ProcessBreak;
|
procedure ProcessBreak;
|
||||||
@ -4328,14 +4333,19 @@ function TGDBMIDebuggerCommandExecute.ProcessStopped(const AParams: String;
|
|||||||
FTheDebugger.QueueExecuteUnlock;
|
FTheDebugger.QueueExecuteUnlock;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
//TODO, decide how much (if any) to run before asking the user
|
||||||
|
SetDebuggerState(dsPause); // after GetLocation => dsPause may run stack, watches etc
|
||||||
|
|
||||||
FTheDebugger.DoException(deRunError, Format('RunError(%d)', [ErrorNo]), Location.Address, '', CanContinue);
|
FTheDebugger.DoException(deRunError, Format('RunError(%d)', [ErrorNo]), Location.Address, '', CanContinue);
|
||||||
if CanContinue
|
if CanContinue
|
||||||
then begin
|
then begin
|
||||||
//ExecuteCommand('-exec-continue')
|
//ExecuteCommand('-exec-continue')
|
||||||
Result := True; // outer funciton result
|
Result := True; // outer funciton result
|
||||||
exit;
|
exit;
|
||||||
end
|
end;
|
||||||
else FTheDebugger.DoCurrent(Location);
|
|
||||||
|
//SetDebuggerState(dsPause); // after GetLocation => dsPause may run stack, watches etc
|
||||||
|
FTheDebugger.DoCurrent(Location);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ProcessRunError;
|
procedure ProcessRunError;
|
||||||
@ -4353,14 +4363,18 @@ function TGDBMIDebuggerCommandExecute.ProcessStopped(const AParams: String;
|
|||||||
FTheDebugger.QueueExecuteUnlock;
|
FTheDebugger.QueueExecuteUnlock;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
SetDebuggerState(dsPause); // after GetLocation => dsPause may run stack, watches etc
|
||||||
|
|
||||||
FTheDebugger.DoException(deRunError, Format('RunError(%d)', [ErrorNo]), 0, '', CanContinue);
|
FTheDebugger.DoException(deRunError, Format('RunError(%d)', [ErrorNo]), 0, '', CanContinue);
|
||||||
if CanContinue
|
if CanContinue
|
||||||
then begin
|
then begin
|
||||||
//ExecuteCommand('-exec-continue')
|
//ExecuteCommand('-exec-continue')
|
||||||
Result := True; // outer funciton result
|
Result := True; // outer funciton result
|
||||||
exit;
|
exit;
|
||||||
end
|
end;
|
||||||
else ProcessFrame(GetFrame(1));
|
|
||||||
|
//SetDebuggerState(dsPause); // after GetLocation => dsPause may run stack, watches etc
|
||||||
|
ProcessFrame(GetFrame(1));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ProcessSignalReceived(const AList: TGDBMINameValueList);
|
procedure ProcessSignalReceived(const AList: TGDBMINameValueList);
|
||||||
@ -4472,15 +4486,13 @@ begin
|
|||||||
|
|
||||||
if BreakID = FTheDebugger.FBreakErrorBreakID
|
if BreakID = FTheDebugger.FBreakErrorBreakID
|
||||||
then begin
|
then begin
|
||||||
SetDebuggerState(dsPause);
|
ProcessBreak; // will set dsPause / unless CanContinue
|
||||||
ProcessBreak;
|
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if BreakID = FTheDebugger.FRunErrorBreakID
|
if BreakID = FTheDebugger.FRunErrorBreakID
|
||||||
then begin
|
then begin
|
||||||
SetDebuggerState(dsPause);
|
ProcessRunError; // will set dsPause / unless CanCuntinue
|
||||||
ProcessRunError;
|
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -4491,15 +4503,10 @@ begin
|
|||||||
// check if we should ignore this exception
|
// check if we should ignore this exception
|
||||||
if FTheDebugger.Exceptions.IgnoreAll
|
if FTheDebugger.Exceptions.IgnoreAll
|
||||||
or (FTheDebugger.Exceptions.Find(ExceptionInfo.Name) <> nil)
|
or (FTheDebugger.Exceptions.Find(ExceptionInfo.Name) <> nil)
|
||||||
then begin
|
then
|
||||||
//ExecuteCommand('-exec-continue')
|
Result := True //ExecuteCommand('-exec-continue')
|
||||||
Result := True;
|
else
|
||||||
exit;
|
ProcessException(ExceptionInfo); // will set dsPause / unless CanCuntinue
|
||||||
end
|
|
||||||
else begin
|
|
||||||
SetDebuggerState(dsPause);
|
|
||||||
ProcessException(ExceptionInfo);
|
|
||||||
end;
|
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -10983,9 +10990,9 @@ var
|
|||||||
begin
|
begin
|
||||||
if (dcsCanceled in SeenStates)
|
if (dcsCanceled in SeenStates)
|
||||||
then begin
|
then begin
|
||||||
exit;
|
|
||||||
FTextValue := '<Canceled>';
|
FTextValue := '<Canceled>';
|
||||||
FValidity := ddsInvalid;
|
FValidity := ddsInvalid;
|
||||||
|
exit;
|
||||||
end;
|
end;
|
||||||
ResultList := TGDBMINameValueList.Create(LastExecResult.Values);
|
ResultList := TGDBMINameValueList.Create(LastExecResult.Values);
|
||||||
FTextValue := ResultList.Values['msg'];
|
FTextValue := ResultList.Values['msg'];
|
||||||
|
Loading…
Reference in New Issue
Block a user