bash PATH problem [WAS:gdb 20000610 crashes]
Wed Jun 28 07:04:00 GMT 2000
At 16:24 2000-06-27 -0400, you wrote:
>Try duplicating the problem with a simple shell script.
>I tried it and couldn't reproduce it in bash.exe or sh.exe.
I can't duplicate it with a shell script, but I made some progress in
locating the problem; I found that I had both a gdb and a gdb.exe in
/usr/lib; these two seems to "cancel" each other and the gdb.exe from the
end of the PATH is called instead. Here is some test code reproducing the
#define NUMBER 0
printf("Hello number %d\n", NUMBER);
gcc hello.c -DNUMBER=1 -o /usr/bin/hello
gcc hello.c -DNUMBER=2 -o /tmp/hello
Hello number 1
So far, so good. Now here is the trick:
cp hello.exe hello
Hello number 2
Gotcha. hello and hello.exe from /usr/bin are both ignored in favor of
hello.exe in /tmp, despites the PATH order.
AndrÃÂ© Bleau, ing., analyste
DÃÂ©partement de gÃÂ©nie ÃÂ©lectrique et Electric Engineering and
de gÃÂ©nie informatique Computer Engineering department
ÃÂcole Polytechnique de MontrÃÂ©al Montreal Polytechnic School
Want to unsubscribe from this list?
Send a message to email@example.com
More information about the Cygwin