mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 06:20:42 +02:00
* Ignore debugger errors when creating locals
git-svn-id: trunk@13742 -
This commit is contained in:
parent
73343131f6
commit
273bdea671
@ -2620,7 +2620,9 @@ begin
|
|||||||
|
|
||||||
// args
|
// args
|
||||||
TGDBMIDebugger(Debugger).ExecuteCommand('-stack-list-arguments 1 %0:d %0:d',
|
TGDBMIDebugger(Debugger).ExecuteCommand('-stack-list-arguments 1 %0:d %0:d',
|
||||||
[TGDBMIDebugger(Debugger).FCurrentStackFrame], [], R);
|
[TGDBMIDebugger(Debugger).FCurrentStackFrame], [cfIgnoreError], R);
|
||||||
|
if R.State <> dsError
|
||||||
|
then begin
|
||||||
List := CreateMIValueList(R);
|
List := CreateMIValueList(R);
|
||||||
S := List.Values['stack-args'];
|
S := List.Values['stack-args'];
|
||||||
FreeAndNil(List);
|
FreeAndNil(List);
|
||||||
@ -2630,12 +2632,16 @@ begin
|
|||||||
List := CreateMIValueList(S);
|
List := CreateMIValueList(S);
|
||||||
AddLocals(List.Values['args']);
|
AddLocals(List.Values['args']);
|
||||||
FreeAndNil(List);
|
FreeAndNil(List);
|
||||||
|
end;
|
||||||
|
|
||||||
// variables
|
// variables
|
||||||
TGDBMIDebugger(Debugger).ExecuteCommand('-stack-list-locals 1', [], R);
|
TGDBMIDebugger(Debugger).ExecuteCommand('-stack-list-locals 1', [cfIgnoreError], R);
|
||||||
|
if R.State <> dsError
|
||||||
|
then begin
|
||||||
List := CreateMIValueList(R);
|
List := CreateMIValueList(R);
|
||||||
AddLocals(List.Values['locals']);
|
AddLocals(List.Values['locals']);
|
||||||
FreeAndNil(List);
|
FreeAndNil(List);
|
||||||
|
end;
|
||||||
FLocalsValid := True;
|
FLocalsValid := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2784,10 +2790,12 @@ begin
|
|||||||
if Debugger = nil then Exit;
|
if Debugger = nil then Exit;
|
||||||
|
|
||||||
Arguments := TStringList.Create;
|
Arguments := TStringList.Create;
|
||||||
TGDBMIDebugger(Debugger).ExecuteCommand('-stack-list-arguments 1 %d %d',
|
TGDBMIDebugger(Debugger).ExecuteCommand('-stack-list-arguments 1 %0:d %0:d',
|
||||||
[AIndex, AIndex], [cfIgnoreError], R);
|
[AIndex], [cfIgnoreError], R);
|
||||||
// TODO: check what to display on error
|
// TODO: check what to display on error
|
||||||
|
|
||||||
|
if R.State <> dsError
|
||||||
|
then begin
|
||||||
List := CreateMIValueList(R);
|
List := CreateMIValueList(R);
|
||||||
S := List.Values['stack-args'];
|
S := List.Values['stack-args'];
|
||||||
FreeAndNil(List);
|
FreeAndNil(List);
|
||||||
@ -2806,9 +2814,12 @@ begin
|
|||||||
FreeAndNil(List);
|
FreeAndNil(List);
|
||||||
end;
|
end;
|
||||||
FreeAndNil(ArgList);
|
FreeAndNil(ArgList);
|
||||||
|
end;
|
||||||
|
|
||||||
TGDBMIDebugger(Debugger).ExecuteCommand('-stack-list-frames %d %d',
|
TGDBMIDebugger(Debugger).ExecuteCommand('-stack-list-frames %0:d %0:d',
|
||||||
[AIndex, AIndex], [], R);
|
[AIndex], [cfIgnoreError], R);
|
||||||
|
if R.State <> dsError
|
||||||
|
then begin
|
||||||
List := CreateMIValueList(R);
|
List := CreateMIValueList(R);
|
||||||
S := List.Values['stack'];
|
S := List.Values['stack'];
|
||||||
FreeAndNil(List);
|
FreeAndNil(List);
|
||||||
@ -2829,6 +2840,8 @@ begin
|
|||||||
);
|
);
|
||||||
|
|
||||||
FreeAndNil(List);
|
FreeAndNil(List);
|
||||||
|
end;
|
||||||
|
|
||||||
Arguments.Free;
|
Arguments.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user