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:
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.