> I have a big problem useing gdb:
> 
> in a very simple (hello world style) program, where I just open a file
> and the close it:
> 
> filename = fopen("toto.txt","r");
> fclose(filename);
> 
> the program runs ok, doing nothing as expected.
> But when using gdb, fopen() returns an address ONLY when file is toto.txt.
> When I change it say to toto2.txt, it returns NO address and fclose makes
> a segmentation fault....
> 
> gdb msg:
> 
> Program received signal SIGSEGV, Segmentation fault.
> _IO_feof (fp=0x0) at feof.c:36
> 36      feof.c: Aucun fichier ou répertoire de ce type.
> 
> using gdb 4.18, or 5.0 same result


Could I suggest downloading a current GDB snapshot and seeing if the 
problem sill occures.  See http://sources.redhat.com/gdb/#download


> on an almost identical machine, it works....


It may not be GDB but also the kernel or something else again.  For 
anyone to have a guess as to what is going wrong a lot more information 
will be needed.  As you noted, an almost identical machine works, 
perhaphs start by eliminating those differences.

        Andrew




_______________________________________________
Bug-gdb mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gdb

Reply via email to