From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24371 invoked by alias); 4 Nov 2009 19:16:36 -0000 Received: (qmail 24359 invoked by uid 22791); 4 Nov 2009 19:16:35 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 Nov 2009 19:16:30 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nA4JGT96024700 for ; Wed, 4 Nov 2009 14:16:29 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nA4JGS6b004360; Wed, 4 Nov 2009 14:16:28 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id nA4JGR3l027089; Wed, 4 Nov 2009 14:16:28 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 546003782CF; Wed, 4 Nov 2009 12:16:27 -0700 (MST) From: Tom Tromey To: gdb-patches@sourceware.org Subject: Re: FYI: minor simplification in add_psymbol_to_bcache References: <20091103202058.GA23081@caradoc.them.org> Reply-To: Tom Tromey Date: Wed, 04 Nov 2009 19:16:00 -0000 In-Reply-To: <20091103202058.GA23081@caradoc.them.org> (Daniel Jacobowitz's message of "Tue, 3 Nov 2009 15:20:58 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00082.txt.bz2 >>>>> "Daniel" == Daniel Jacobowitz writes: Tom> First, it removes the gratuitous use of a 'static' local variable. Daniel> It adds a memset... if you assume that this is a hot function, then it Daniel> was probably avoided on purpose. On the other hand, the way it's Daniel> implemented is quite dodgy; there will be bogus padding if Daniel> sizeof (long) != sizeof (CORE_ADDR) and you alternate adding symbols Daniel> with VAL and COREADDR set. TBH I was not thinking too soundly, I suppose, when I nuked this. I think your point is a good one. If you'd prefer, I will leave this static and just zero out that field. Tom