From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28901 invoked by alias); 22 Sep 2003 04:55:04 -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 28892 invoked from network); 22 Sep 2003 04:55:03 -0000 Received: from unknown (HELO localhost.redhat.com) (65.49.0.121) by sources.redhat.com with SMTP; 22 Sep 2003 04:55:03 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 4A66B2B89; Mon, 22 Sep 2003 00:54:52 -0400 (EDT) Message-ID: <3F6E809C.90007@redhat.com> Date: Mon, 22 Sep 2003 04:55:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Biggs Cc: GDB list Subject: Re: TI C6x support References: <1062318060.15365.10.camel@steve.softier.local> <1063180555.31842.0.camel@steve.softier.local> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-09/txt/msg00269.txt.bz2 > May I ask why nobody has answered me? Very likely, and unfortunatly, because no one here uses COFF. > On Sun, 2003-08-31 at 11:21, Stephen Biggs wrote: > >> I am adding full support for the TI C6X (mostly C64xx) chip to BFD and >> GDB. I intend to submit a patch as soon as stability of my port and >> company politics allow. >> >> I am stuck. >> >> It seems that the COFF version of GDB creates a fake symbol table with a >> filename of "_globals_" and language. This is not working for >> me. I compile with Dwarf2 and have all the symbols and the symbols show >> up in a dump as correct for the C file. When I try to "disassemble >> main", I get back the response "main is not a function". This is the >> same response I get when I try "list". Disassembly using the raw >> address of "main" works just fine. >> >> I am trying to decipher the code that causes these messages but am >> running into a wall. I know that this is something stupid on my part >> and quite simple, but I just can't get it. It's probably a bug. I suspect you either have corrupt input, or GDB is getting out of sync. I've quoted some relevant sections of the out-of-print book Understanding and Using COFF: ``Index 0, for .file, is an N_DEBUG section number. Though in general N_DEBUB means value is meaningless, in the case of .file, the value has a very important meaning. Value is the symbol table index to the next .file symbol table entry. The .file symbol table value entries form a linked circular list (the filan entry points back to the first) that is used by the debugger to quickly find the region of debug information associated with the particular .file filename.'' ``Defined global symbol table entries follow the static symbol table entries of the last filename-function-static symbol table sequence.'' ``Undefined global symbol are the last entries in the symbol table. This is true only for an object file: an executable file does not hae any undefined references. It wouldn't be executable if it did.'' The code appears to think that its fallen off the end of the symbol table and into the globals section. Andrew