From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23308 invoked by alias); 29 Jul 2003 06:50:47 -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 23214 invoked from network); 29 Jul 2003 06:50:46 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 29 Jul 2003 06:50:46 -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 h6T6okZ25241; Tue, 29 Jul 2003 02:50:46 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h6T6ojI01923; Tue, 29 Jul 2003 02:50:45 -0400 Received: from localhost.localdomain.redhat.com (vpn50-13.rdu.redhat.com [172.16.50.13]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h6T6ndL17594; Tue, 29 Jul 2003 02:50:27 -0400 To: binutils@sources.redhat.com Cc: gdb@sources.redhat.com Subject: Re: fake symbols to aid debugging References: <20030729023258.GH27145@bubble.sa.bigpond.net.au> From: Nick Clifton Date: Tue, 29 Jul 2003 06:50:00 -0000 In-Reply-To: <20030729023258.GH27145@bubble.sa.bigpond.net.au> (Alan Modra's message of "Tue, 29 Jul 2003 12:02:58 +0930") 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-07/txt/msg00327.txt.bz2 Hi Alan, > I waste enough time doing this that I figure it's worth doing something > about it. My first idea, already implemented, was to have the linker > emit extra symbols to identify the stubs. This works well but bloats > the symbol table and isn't on by default. A better idea would be to > create the stub symbols on the fly. With that in mind, I propose to > add two new bfd functions > > long bfd_get_fake_symtab_upper_bound (bfd *abfd); > long bfd_canonicalize_fake_symtab (bfd *abfd, asymbol **buf); > > analogous to bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. > > Comments? Well a few questions actually: Where would these fake symbols be held ? In a new .fakesymtab section? Or are they entirely ephemeral and never stored in the executable ? Can the fake symbols be generated after the stubs are created ? ie can they be created for already existing libraries/executables ? Would gdb users be able to set breakpoints on these fake symbols ? Cheers Nick