debugger: reset working directory before setting it, to workaround a possible gdb bug, fjxes bug #10308.

git-svn-id: trunk@13184 -
This commit is contained in:
vincents 2007-12-06 22:40:01 +00:00
parent c87af36609
commit 5a6eb8feed

View File

@ -2172,7 +2172,13 @@ begin
DebugLn(['TGDBMIDebugger.StartDebugging WorkingDir="',WorkingDir,'"']);
if WorkingDir <> ''
then ExecuteCommand('-environment-cd %s', [ConvertToGDBPath(WorkingDir)], []);
then begin
// to workaround a possible bug in gdb, first set the workingdir to .
// otherwise on second run within the same gdb session the workingdir
// is set to c:\windows
ExecuteCommand('-environment-cd %s', ['.'], [cfIgnoreError]);
ExecuteCommand('-environment-cd %s', [ConvertToGDBPath(WorkingDir)], []);
end;
FTargetFlags := [tfHasSymbols]; // Set until proven otherwise