From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13899 invoked by alias); 10 Sep 2002 18:39:58 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 13891 invoked from network); 10 Sep 2002 18:39:57 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by sources.redhat.com with SMTP; 10 Sep 2002 18:39:57 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id g8AIds132541; Tue, 10 Sep 2002 11:39:54 -0700 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: Andrew Cagney Cc: gdb Subject: Re: naive GDB programming style questions References: <3D7D4ED2.2050401@ges.redhat.com> Content-Type: text/plain; charset=US-ASCII From: David Carlton Date: Tue, 10 Sep 2002 11:39:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 X-SW-Source: 2002-09/txt/msg00083.txt.bz2 On 09 Sep 2002 20:52:14 -0700, David Carlton said: > On Mon, 09 Sep 2002 21:45:54 -0400, Andrew Cagney said: >> If you've a copy of the ISO C and C++ manuals, have a look at what >> they have to say about ``NULL'' pointers. It's weird. > Though if you're referring to the fact that NULL's underlying bit > representation might not be 0, I'm not sure that's a big deal here. Actually, that raises another question: if I'm allocating an array of pointers that I want initialized to NULL, am I allowed to use xcalloc() to handle that, or do I have to loop through the memory myself to set all the pointers to NULL? Because the former is technically incorrect, but I don't know if GDB runs on any platforms for which it wouldn't work; I think I've seen parts of GDB initialize pointers to NULL using xcalloc or memset, but maybe I'm wrong. David Carlton carlton@math.stanford.edu