From b37d4ad3524f7922b9f2814128dc1d747070a92a Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Wed, 7 Jun 2017 14:39:10 +0200 Subject: [PATCH] fix #156 - Debugee option "workingDirectory" does not expand the symstrings --- src/ce_gdb.pas | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/ce_gdb.pas b/src/ce_gdb.pas index d5eecd5e..79d1d425 100644 --- a/src/ce_gdb.pas +++ b/src/ce_gdb.pas @@ -1757,7 +1757,7 @@ begin str := fSyms.expand(str[1..str.length-1]); gdbCommand('-environment-path ' + str); end; - if DirectoryExists(o.workingDirectory) then + if DirectoryExists(fSyms.expand(o.workingDirectory)) then gdbCommand('-environment-cd ' + fSyms.expand(o.workingDirectory)); if (o.arguments.Count <> 0) or (o.queryArguments) then begin @@ -1785,22 +1785,19 @@ begin dbgeeOptsEd.TIObject := nil; if not fDbgRunnable then begin - if fProj = nil then - exit - else nme := fProj.filename; - if not nme.fileExists then - exit; + if fProj <> nil then + nme := fProj.filename; end else begin - if fDoc = nil then - exit - else nme := fDoc.filename; - if not nme.fileExists then - exit; + if fDoc.isNotNil then + nme := fDoc.filename; + end; + if nme.fileExists then + begin + opt := fDebugeeOptions.projectByFile[nme]; + dbgeeOptsEd.TIObject := opt; end; - opt := fDebugeeOptions.projectByFile[nme]; - dbgeeOptsEd.TIObject := opt; end; procedure TCEGdbWidget.synchronizeBreakpointsFromDoc;