Date: Tue, 11 Apr 2000 13:30:31 +0100 From: "Marco van de Voort" <marcov@stack.nl> To: hackers@freebsd.org Subject: ktrace, syscalls and filehandles. Message-ID: <20000411182612.6D3E02E802@hermes.tue.nl>
next in thread | raw e-mail | index | archive | help
OS: FreeBSD 4.0 I have a ported pascal compiler that doesn't work yet. I use ktrace (great tool btw) to find the problem, mainly because the differences between the linux and FreeBSD version are only in about 50 syscall calling routines. Now the program terminates with the following sequence, which makes me wonder. - A fstat (handle,buffer) with handle = 0x4 and buffer the right value. returns 0. (success). I checked, and the file does exist. - then a lseek on the same handle (0x4, so not overwritten by a dangling pointer ), returns -1 (I forgot the errno, but ktrace says bad filedescriptor) How can this happen? There is no call to close(or any other syscall) inbetween, and I guess that the actual data for filedescriptor 4 is in some protected space, which I can't have mutilated? (p.s. Keep in mind I can't GDB yet, the plain GDB v4.18 don't seem to work on 4.0. and I need them for an OBJPAS patch. The problems have to do with solib.c ) Marco van de Voort (MarcoV@Stack.nl) <http://www.stack.nl/~marcov/xtdlib.htm> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000411182612.6D3E02E802>