From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17517 invoked by alias); 31 Jan 2003 20:42:33 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 17441 invoked from network); 31 Jan 2003 20:42:32 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by 172.16.49.205 with SMTP; 31 Jan 2003 20:42:32 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id h0VKgIb30763; Fri, 31 Jan 2003 12:42:18 -0800 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa] ALL_OBJFILE_MSYMBOLS References: From: David Carlton Date: Fri, 31 Jan 2003 20:42: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 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-01/txt/msg00847.txt.bz2 On 31 Jan 2003 15:01:24 -0500, Jim Blandy said: > I think I'd prefer the patch below. Could you try it out and see if > it works as well? Yes, it also fixes the bug I'm seeing. > This was messier than I had expected. Yah. > (Which is a great example of one reason C macros suck and Lisp > macros don't --- in case that's an emotionally charged issue for > anyone else out there like it is for me. :) ) I thought for a while about good responses to this, but I think I'll just leave it alone for now. :-) > But it would be better anyway for an empty minsym table to have a > single, consistent representation. That was my first reaction, too. But while I was thinking about how to do that, I noticed that ALL_MSYMBOLS already dealt with the possibility of a NULL entry, so I just went with that out of laziness. Like you, trusting the count sounds like a good idea. And, even if you go with a terminating entry, having it be a fake symbol instead of, say, a NULL pointer is pretty weird, too. But making either of those changes sounds like too much (fallible) work for too little benefit. > So here's a patch which simply ensures that every objfile's minsym > table has a terminating entry, and makes some appropriate accompanying > changes. The tests are still running, but I haven't noticed any > regressions yet. Seems sensible to me. I didn't do a full testsuite run, but I did apply it to my branch and try to trigger the bug I'd been seeing there, and your patch does protect against the bug. David Carlton carlton@math.stanford.edu