Path: chuka.playstation.co.uk!scea!peter_alau@playstation.sony.com From: "Steve Spiller" Newsgroups: scea.yaroze.problems.pc Subject: Re: Debugging, debugging... Date: Mon, 3 Aug 1998 09:49:42 -0700 Organization: SCEA News Server Lines: 38 Message-ID: <6q4prs$hlq2@scea> References: <6pind1$ep36@scea> <01bdbe48$45ce1b60$549a7095@edfhome.3com.com> NNTP-Posting-Host: gateway.connext.com X-Newsreader: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Ed Federmeyer wrote in message <01bdbe48$45ce1b60$549a7095@edfhome.3com.com>... >Sorry I can't help with the GDB problem, but I did notice that the Yaroze >does >not like freeing NULL pointers, unlike most other systems, which treat >free(NULL) >as a NOOP. (The book "Writing Solid Code" has a good writeup on freeing As a matter of fact, I have a copy of that on my desk here at work. :) >NULL pointers, and he essentially thinks allowing free(NULL) to be BAD >because >it allows latent bugs to creep in, but that so much code would stop working >if it >suddenly didn't work, that it needs to be left as-is!) > >Anyway, since I've taken to checking for NULL before free(), my programs >have >become much more stable. (I can trace the root cause of WHY the pointer >was NULL when I didn't think it should be, etc.). Well, I didn't want to check for NULL becuase they shouldn't be NULL! Since I am still unable to get GDB to work properly for me, I've been reduced to flooding the code with printf()'s for debugging. :) > >You might give it a try. >EdF > Thanks for the suggestions! -Steve