mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-28 06:50:32 +02:00
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:
parent
c87af36609
commit
5a6eb8feed
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user