fix #73 - Need gdb custom path setting for Linux and Windows

This commit is contained in:
Basile Burg 2021-08-01 13:05:39 +02:00
parent d41e83a9e2
commit 6a7c74e3a1
2 changed files with 9 additions and 2 deletions

View File

@ -5,6 +5,7 @@
- Halstead metrics: show full function signatures.
- DUB projects: added support for the _syntax_ build type. (#83)
- GDB commander: arguments of the _Debugee Options_ can be temporarily deactivated by prepending `//`.
- GDB commander: add an option allowing to set the path to the gdb binary. (#73)
- Search results: use GNU style messages. (#84)
# v3.9.11

View File

@ -316,6 +316,7 @@ type
fDlangBreakpoints: TDlangBreakpoints;
fCurrentEvalKind: TGdbEvalKind;
fMaxCallStackDepth: integer;
fGdbPath: TFilename;
procedure setIgnoredSignals(value: TStringList);
procedure setCommandsHistory(value: TStringList);
procedure setCustomEvalHistory(value: TStringList);
@ -334,6 +335,7 @@ type
property coreBreakingSymbols: TDlangBreakpoints read fDlangBreakpoints write fDlangBreakpoints;
property currentEvalKind: TGdbEvalKind read fCurrentEvalKind write fCurrentEvalKind;
property customEvalHistory: TStringList read fCustomEvalHistory write setCustomEvalHistory;
property gdbPath: TFilename read fGdbPath write fGdbPath;
property hideCpuView: boolean read fHideCpuView write fHideCpuView default false;
property ignoredSignals: TStringList read fIgnoredSignals write setIgnoredSignals;
property keepRedirectedStreams: boolean read fKeepRedirectedStreams write fKeepRedirectedStreams default false;
@ -1959,10 +1961,14 @@ begin
FreeAndNil(fInput);
FreeAndNil(fOutput);
gdb := exeFullName('gdb');
if fOptions.gdbPath <> '' then
gdb := fOptions.gdbPath
else
gdb := exeFullName('gdb' + exeExt);
if not gdb.fileExists then
begin
dlgOkInfo('Cannot debug, GDB is missing', 'GDB commander');
dlgOkInfo('gdb cannot be found, check the options', 'GDB commander');
exit;
end;