From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14386 invoked by alias); 11 Mar 2005 00:10:36 -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 14226 invoked from network); 11 Mar 2005 00:10:23 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 11 Mar 2005 00:10:23 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j2B0ANx7014687 for ; Thu, 10 Mar 2005 19:10:23 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j2B0AKn01319; Thu, 10 Mar 2005 19:10:20 -0500 Received: from redhat.com (dhcp-172-16-25-137.sfbay.redhat.com [172.16.25.137]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id j2B0AD5s020079; Thu, 10 Mar 2005 19:10:15 -0500 Message-ID: <4230E1E3.5080605@redhat.com> Date: Fri, 11 Mar 2005 00:10:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20040924 MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb-patches@sources.redhat.com, Elena Zannoni Subject: Re: [rfa] Skip "special" symbols when reading minimal symbols References: <20050309173557.GA17136@nevyn.them.org> In-Reply-To: <20050309173557.GA17136@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-03/txt/msg00179.txt.bz2 Daniel Jacobowitz wrote: > Nick recently introduced a hook in bfd to allow a target to mark a symbol as > "special". What exactly "special" means isn't well defined, except that > they are not normal symbols, and objdump and nm will decline to display them > unless an additional command line option is given. So, I would like to make > that the default behavior in GDB also. > > GDB could make use of special symbols in a target-specific fashion - in this > case, to build up a PC -> ISA mapping. The most logical way to do this > would be to call a gdbarch hook for special symbols (or for all symbols?). > But we don't need that yet, so I haven't added the hook. > > The advantage of skipping the mapping symbols is that they generally occur > at the same addresses as other non-mapping symbols. This causes GDB to show > "$a" in disassembly instead of "main" in some cases (depending on the > vagaries of hashing). Whatever target-specific meaning a special symbol may > have, the BFD hook indicates that it isn't a standard symol, so I think it's > appropriate to skip it in GDB. > > Is this patch OK? Fixes a number of testsuite failures on arm-linux and > arm-netbsd. > I assume, if the hook is defined, you would just call it before (or instead of) skipping the symbol? Maybe the hook return value (true or false) could tell elfread whether to skip the symbol or save it? In case it might be useful later? I think the idea is sound, but since I've no idea what these are intended for (currently or in the future), it's hard to say whether defaulting to omit them is the right thing.