From owner-freebsd-questions Fri Jul 28 16:33:48 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 9669137B9E0 for ; Fri, 28 Jul 2000 16:33:44 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e6SNXgo13131; Fri, 28 Jul 2000 16:33:42 -0700 (PDT) Date: Fri, 28 Jul 2000 16:33:42 -0700 From: Alfred Perlstein To: Ariel Burbaickij Cc: questions@FreeBSD.ORG Subject: Re: How to debug library function at run-time actually to see what isit doing ? Message-ID: <20000728163342.L17222@fw.wintelcom.net> References: <20000728163021.K17222@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20000728163021.K17222@fw.wintelcom.net>; from bright@wintelcom.net on Fri, Jul 28, 2000 at 04:30:21PM -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Alfred Perlstein [000728 16:31] wrote: > * Ariel Burbaickij [000728 16:02] wrote: > > Situation : > > > > fopen(name,"r")returns NULL on existing file with proper permissions > > I know possible reasons but I would like to know what is the reason > > in this special situation .How to see what the function is really doing > > and why it leads to seeting return value to NULL. > > fopen will set errno on failure, see the errno manpage as well as > strerror. That ought to help you diagnose what's going wrong. I should have mentioned that you should be able to compile libc with debugging flags by adding a '-g' to the CFLAGS line in /usr/src/lib/libc/Makefile and recompiling it (make && make install) that ought to allow you to see what's going on in libc. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message