mirror of https://gitlab.com/basile.b/dexed.git
gdb commander, save and reload custom eval kind between sessions
This commit is contained in:
parent
f26a7b9305
commit
ab343f3e38
|
@ -290,6 +290,8 @@ type
|
||||||
|
|
||||||
TDlangBreakpoints = set of TDlangBreakpoint;
|
TDlangBreakpoints = set of TDlangBreakpoint;
|
||||||
|
|
||||||
|
TGdbEvalKind = (gekSelectedVar, gekDerefSelectedVar, gekCustom);
|
||||||
|
|
||||||
TDebugOptionsBase = class(TWritableLfmTextComponent)
|
TDebugOptionsBase = class(TWritableLfmTextComponent)
|
||||||
private
|
private
|
||||||
fAutoDisassemble: boolean;
|
fAutoDisassemble: boolean;
|
||||||
|
@ -310,6 +312,7 @@ type
|
||||||
fStopAllThreadsOnBreak: boolean;
|
fStopAllThreadsOnBreak: boolean;
|
||||||
fHideCpuView: boolean;
|
fHideCpuView: boolean;
|
||||||
fDlangBreakpoints: TDlangBreakpoints;
|
fDlangBreakpoints: TDlangBreakpoints;
|
||||||
|
fCurrentEvalKind: TGdbEvalKind;
|
||||||
procedure setIgnoredSignals(value: TStringList);
|
procedure setIgnoredSignals(value: TStringList);
|
||||||
procedure setCommandsHistory(value: TStringList);
|
procedure setCommandsHistory(value: TStringList);
|
||||||
procedure setCustomEvalHistory(value: TStringList);
|
procedure setCustomEvalHistory(value: TStringList);
|
||||||
|
@ -325,6 +328,7 @@ type
|
||||||
property autoGetThreads: boolean read fAutoGetThreads write fAutoGetThreads;
|
property autoGetThreads: boolean read fAutoGetThreads write fAutoGetThreads;
|
||||||
property commandsHistory: TStringList read fCommandsHistory write setCommandsHistory;
|
property commandsHistory: TStringList read fCommandsHistory write setCommandsHistory;
|
||||||
property coreBreakingSymbols: TDlangBreakpoints read fDlangBreakpoints write fDlangBreakpoints;
|
property coreBreakingSymbols: TDlangBreakpoints read fDlangBreakpoints write fDlangBreakpoints;
|
||||||
|
property currentEvalKind: TGdbEvalKind read fCurrentEvalKind write fCurrentEvalKind;
|
||||||
property customEvalHistory: TStringList read fCustomEvalHistory write setCustomEvalHistory;
|
property customEvalHistory: TStringList read fCustomEvalHistory write setCustomEvalHistory;
|
||||||
property hideCpuView: boolean read fHideCpuView write fHideCpuView default false;
|
property hideCpuView: boolean read fHideCpuView write fHideCpuView default false;
|
||||||
property ignoredSignals: TStringList read fIgnoredSignals write setIgnoredSignals;
|
property ignoredSignals: TStringList read fIgnoredSignals write setIgnoredSignals;
|
||||||
|
@ -403,8 +407,6 @@ type
|
||||||
property projectByFile[const fname: string]: TDebugeeOption read getProjectByFile; default;
|
property projectByFile[const fname: string]: TDebugeeOption read getProjectByFile; default;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TGdbEvalKind = (gekSelectedVar, gekDerefSelectedVar, gekCustom);
|
|
||||||
|
|
||||||
{ TGdbWidget }
|
{ TGdbWidget }
|
||||||
TGdbWidget = class(TDexedWidget, IProjectObserver, IDocumentObserver, IDebugger)
|
TGdbWidget = class(TDexedWidget, IProjectObserver, IDocumentObserver, IDebugger)
|
||||||
btnContinue: TDexedToolButton;
|
btnContinue: TDexedToolButton;
|
||||||
|
@ -760,6 +762,7 @@ begin
|
||||||
fCommandsHistory.Assign(src.fCommandsHistory);
|
fCommandsHistory.Assign(src.fCommandsHistory);
|
||||||
fShortcuts.assign(src.fShortcuts);
|
fShortcuts.assign(src.fShortcuts);
|
||||||
fKeepRedirectedStreams := src.fKeepRedirectedStreams;
|
fKeepRedirectedStreams := src.fKeepRedirectedStreams;
|
||||||
|
fCurrentEvalKind := src.fCurrentEvalKind;
|
||||||
end
|
end
|
||||||
else inherited;
|
else inherited;
|
||||||
end;
|
end;
|
||||||
|
@ -1273,6 +1276,7 @@ destructor TGdbWidget.destroy;
|
||||||
begin
|
begin
|
||||||
fInput.free;
|
fInput.free;
|
||||||
fOutput.Free;
|
fOutput.Free;
|
||||||
|
fOptions.fCurrentEvalKind:=fEvalKind;
|
||||||
fOptions.commandsHistory.Assign(edit1.Items);
|
fOptions.commandsHistory.Assign(edit1.Items);
|
||||||
fOptions.Free;
|
fOptions.Free;
|
||||||
fLog.Free;
|
fLog.Free;
|
||||||
|
@ -1426,6 +1430,13 @@ begin
|
||||||
itm.Bitmap.Assign(bmp);
|
itm.Bitmap.Assign(bmp);
|
||||||
itm.ImageIndex:= fMenu.GetImageList.Add(bmp, nil);
|
itm.ImageIndex:= fMenu.GetImageList.Add(bmp, nil);
|
||||||
|
|
||||||
|
fEvalKind:= fOptions.fCurrentEvalKind;
|
||||||
|
case fEvalKind of
|
||||||
|
TGdbEvalKind.gekSelectedVar : mnuEvalSelected.Click();
|
||||||
|
TGdbEvalKind.gekDerefSelectedVar: mnuEvalDeref.Click();
|
||||||
|
TGdbEvalKind.gekCustom : mnuEvalCustom.Click();
|
||||||
|
end;
|
||||||
|
|
||||||
bmp.Free;
|
bmp.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue