mirror of https://gitlab.com/basile.b/dexed.git
gdb commander, place results of custm eval in the variable list
it's not anymore required to inspect the raw gdbmi output to see them
This commit is contained in:
parent
ab343f3e38
commit
70e85ed84e
src
|
@ -501,6 +501,7 @@ type
|
||||||
fSubj: TDebugObserverSubject;
|
fSubj: TDebugObserverSubject;
|
||||||
fDoc: TDexedMemo;
|
fDoc: TDexedMemo;
|
||||||
fDbgRunnable: boolean;
|
fDbgRunnable: boolean;
|
||||||
|
fCatchCustomEval: boolean;
|
||||||
fProj: ICommonProject;
|
fProj: ICommonProject;
|
||||||
fJson: TJsonObject;
|
fJson: TJsonObject;
|
||||||
fLog: TStringList;
|
fLog: TStringList;
|
||||||
|
@ -2231,6 +2232,30 @@ var
|
||||||
fFpuRaw: array[0..9] of Byte absolute fFpuExtended;
|
fFpuRaw: array[0..9] of Byte absolute fFpuExtended;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
if fCatchCustomEval then
|
||||||
|
begin
|
||||||
|
fCatchCustomEval := false;
|
||||||
|
if fJson.findAny('value', val) then
|
||||||
|
begin
|
||||||
|
case fEvalKind of
|
||||||
|
TGdbEvalKind.gekSelectedVar:
|
||||||
|
lstVariables.AddItem(format('reevaluation of `%s`', [fLastEvalStuff]), nil);
|
||||||
|
TGdbEvalKind.gekDerefSelectedVar:
|
||||||
|
lstVariables.AddItem(format('dereference of `*(%s)`', [fLastEvalStuff]), nil);
|
||||||
|
TGdbEvalKind.gekCustom:
|
||||||
|
lstVariables.AddItem(format('evaluation of `%s`', [fLastEvalStuff]), nil);
|
||||||
|
end;
|
||||||
|
with lstVariables.Items[lstVariables.Items.Count-1] do
|
||||||
|
begin
|
||||||
|
SubItems.Add(val.AsString);
|
||||||
|
MakeVisible(false);
|
||||||
|
Selected:=true;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else dlgOkInfo(format('it was not possible to evaluate '#10#9'`%s`', [fLastEvalStuff]));
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
if fJson.findAny('reason', val) then
|
if fJson.findAny('reason', val) then
|
||||||
begin
|
begin
|
||||||
reason := val.AsString;
|
reason := val.AsString;
|
||||||
|
@ -2666,7 +2691,8 @@ end;
|
||||||
procedure TGdbWidget.evalStuff(const stuff: string);
|
procedure TGdbWidget.evalStuff(const stuff: string);
|
||||||
begin
|
begin
|
||||||
fLastEvalStuff := stuff;
|
fLastEvalStuff := stuff;
|
||||||
gdbCommand('-data-evaluate-expression "' + stuff + '"');
|
fCatchCustomEval := true;
|
||||||
|
gdbCommand('-data-evaluate-expression "' + stuff + '"', @gdboutJsonize);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGdbWidget.continueDebugging;
|
procedure TGdbWidget.continueDebugging;
|
||||||
|
|
Loading…
Reference in New Issue