This is the mail archive of the insight@sourceware.cygnus.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Insight TCL does not understand cygwin filenames


When I compile a simple hello.c file with cygwin gcc,
say /src/test/hello.c
then try to debug this file with insight, I get a stack
trace, "could not stat file /src/test/hello.c"

If I use gdb -nw, I can list the file properly, and there
are no problems.

This is because insight does a stat <filename> to check
the files modification time.

The tcl supplied with insight does not understand cygwin
filenames, so tries to stat "\src\test\hello.c"

As I have / mounted as e:\cygwin1.1, tcl should try to stat
E:\cygwin1.1\src\test\hello.c

Modifiying the Tcl_TranslateFileName function, in
insight-5.0\tcl\generic\tclFileName.c as follows
corrects this, and Insight works correctly.

Compare: (<)E:\cygnus\src\original\insight-5.0\tcl\generic\tclFileName.c
   with: (>)E:\cygnus\src\insight-5.0\tcl\generic\tclFileName.c

923a923,927
>     char dos_name[PATH_MAX];
> 
>     cygwin_conv_to_win32_path( name, dos_name );
> 
>     name=dos_name;

Note that if I happened to have / mounted as E:\ insight
would have worked without the above patch.

Tim



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]