From: <da...@de...> - 2003-06-26 20:42:37
|
Benjamin Riefenstahl <Ben...@ep...> writes: > Hi David, > da...@de... (David N. Welton) writes: > > gdb ./statproblem > Just a note: Using the debugger is not a good way to demonstrate a > problem in the code. The debugger may just be confused. Try to use > printf() to output the size of the structures and the contents. > I'm not saying that there isn't a problem, just that I wouldn't want > to debug a problem like this based only on debugger output. Good point, although the practical evidence for me is that Rivet crashes unless I take care to make sure that both Apache and Tcl are compiled with the same options. Just for fun: modprintstats(struct stat *ss) { printf("st_dev:%lu st_ino:%u st_mode:%u st_nlink:%u st_uid:%u st_gid:%u st_rdev:%lu st_size:%lu st_blksize:%lu\n", (unsigned long)ss->st_dev, (unsigned int)ss->st_ino, (unsigned int)ss->st_mode, (unsigned int)ss->st_nlink, (unsigned int)ss->st_uid, (unsigned int)ss->st_gid, (unsigned long)ss->st_rdev, (unsigned long)ss->st_size, (unsigned long)ss->st_blksize ); } The screwy one in the loaded module: st_dev:780 st_ino:692969 st_mode:33204 st_nlink:1 st_uid:1000 st_gid:1000 st_rdev:0 st_size:1153 st_blksize:2147482788 The ok one in the main program: st_dev:780 st_ino:692969 st_mode:33204 st_nlink:1 st_uid:1000 st_gid:1000 st_rdev:0 st_size:1153 st_blksize:4096 Thanks, -- David N. Welton Consulting: http://www.dedasys.com/ Personal: http://www.dedasys.com/davidw/ Free Software: http://www.dedasys.com/freesoftware/ Apache Tcl: http://tcl.apache.org/ |