Author Topic: Old compiler path still in the PATH when changed to new compiler  (Read 4354 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
I found that if I change the compiler toolchain path, then sometimes, I still see the old compiler path in PATH variable, this can be seen from the GDB command line:

Code
Active debugger config: GDB/MI:Default
start debugger
Selecting target:
Debug
Adding file: E:\code\cb\test_code\mortenr2012-01-15\bin\Debug\mortenr2012-01-15.exe

[debug]PATH=.;D:\mingw-builds\i686-4.8.2-release-posix-dwarf-rt_v3-rev0\mingw32\bin;D:\mingw-builds\i686-4.8.2-release-posix-dwarf-rt_v3-rev0\mingw32;D:\mingw-builds\x32-4.8.1-posix-dwarf-rev5\mingw32\bin;D:\mingw-builds\x32-4.8.1-posix-dwarf-rev5\mingw32;.;F:\cb_sf_git\trunk\src\lib;E:\code\wx-mingw-build-481-dw2\wxWidgets-2.8.12\lib\gcc_dll;F:\cb_sf_git\trunk\src\devel;E:\code\common_bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;D:\Program Files\TortoiseSVN\bin

Note that this is after I change the compiler path from:
D:\mingw-builds\x32-4.8.1-posix-dwarf-rev5\mingw32
to
D:\mingw-builds\i686-4.8.2-release-posix-dwarf-rt_v3-rev0\mingw32
But I see that the path "D:\mingw-builds\x32-4.8.1-posix-dwarf-rev5\mingw32\bin;D:\mingw-builds\x32-4.8.1-posix-dwarf-rev5\mingw32;.;" are still there.

Note, there are double "." (current path) in the PATH, it looks like this is also an issue.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Old compiler path still in the PATH when changed to new compiler
« Reply #1 on: October 25, 2013, 01:16:13 pm »
I experienced the same behavior with avr-gdb. The old path vanishes after restart. I think it's related with the windows path. I think the old settings stays cached till a restart and gdb reads the cached versions.