From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10321 invoked by alias); 25 Nov 2003 12:25:14 -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 10076 invoked from network); 25 Nov 2003 12:25:11 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 25 Nov 2003 12:25:11 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id hAPCPBH19048; Tue, 25 Nov 2003 07:25:11 -0500 Received: from pobox.surrey.redhat.com (pobox.surrey.redhat.com [172.16.10.17]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id hAPCPAw19598; Tue, 25 Nov 2003 07:25:10 -0500 Received: from localhost.localdomain.redhat.com (vpnuser9.stuttgart.redhat.com [172.16.4.9]) by pobox.surrey.redhat.com (8.12.8/8.12.8) with ESMTP id hAPCP6GN007266; Tue, 25 Nov 2003 12:25:08 GMT To: Andrew Cagney Cc: gdb-patches@sources.redhat.com, binutils@sources.redhat.com Subject: Re: RFA: Skip ARM ELF Mapping symbols when showing disassembly References: <3FBA4581.1080904@redhat.com> From: Nick Clifton Date: Tue, 25 Nov 2003 12:25:00 -0000 In-Reply-To: <3FBA4581.1080904@redhat.com> (Andrew Cagney's message of "Tue, 18 Nov 2003 11:14:57 -0500") Message-ID: User-Agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-11/txt/msg00559.txt.bz2 Hi Andrew, > Hmm, what information do those mapping symbols provide? Dig dig (from > tc-arm.c) ... [snip] > So GDB and objdump both need this information? Well yes and no... > How does objdump handle all this? Apart from a hack to objdump to skip the mapping symbols when displaying disassembly it does not use them. Objdump (and gdb) both have perfectly adequate mechanisms for distinguishing between code and data and between ARM and THUMB instructions, so they do not need the mapping symbols. The code to support mapping symbols in GAS was developed by ARM and I accepted it because these symbols are required by the ARM ELF specification. [I believe that where possible, binutils should attempt to follow all appropriate standards and specifications]. Note - the patch is not a complete implementation of the specification since the linker ought to generate these mapping symbols for its arm<->thumb calling stubs. Currently this has not been implemented. So basically the mapping symbols are a distraction which gdb ought to be able to ignore. (Or use if it feels so minded, although as I say, they are not fully implemented yet). > - should there be a BFD method that lets GDB better identify a user > visible [minimal] symbol (gdb's elf reader currently contains what > can only be described as heuristics). Yes - this would be a much cleaner way of handling this situation, and presumably similar situations for other architectures which have system type symbols which users are not supposed to see. > - should there be a BFD method that, given an address and symbol > table, indicates the relevant ISA/ABI? Not sure. Having such a method would be a good idea, but I am not sure if it belongs in BFD or in OPCODES. (Since opcodes already has other disassembler related stuff). > - or even just have BFD export name->addr and addr->name methods? It already exports the bfd_asymbol_value() macro which can do name->addr translation and the _bfd_find_nearest_line() function which can do addr->name translation. (Although it does not return a symbol pointer). Were you thinking of these or something else ? Cheers Nick