From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14919 invoked by alias); 8 Sep 2004 16:27:33 -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 14857 invoked from network); 8 Sep 2004 16:27:32 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 8 Sep 2004 16:27:32 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i88GRTS2022766 for ; Wed, 8 Sep 2004 12:27:32 -0400 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i88GRP307217; Wed, 8 Sep 2004 12:27:26 -0400 To: Sachidananda Swain Cc: Daniel Berlin , steve.miller@st.com, Lan.Zhang@Zoran.com, gdb@sources.redhat.com, port-arm@NetBSD.org, gdb@sourceware.cygnus.com, Lin.Colin@iac.com.tw, grante@visi.com, gdb-discuss@gnu.org, davidm@snapgear.com, drow@false.org Subject: Re: [Gdb-discuss] Dwarf Error: Cannot find referent at offset XXXXXX References: From: Jim Blandy Date: Wed, 08 Sep 2004 16:27:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-09/txt/msg00070.txt.bz2 Sachidananda Swain writes: > I am working on GDB for debugging. Tried with all gdb version and in all > cases I am getting Dwarf error. Please tell me how to overcome this error. > What I feel that there may be mismatching of dwarf format between ads > compiler and gdb. I saw so many numbers of people facing this problem. So > tell be very frankly that this problem can be solved or not; otherwise I > have to close this project because I am in a deadline. If any where I am > doing mistake please tell me how to do this. Once I can able to communicate > >From host with all commands then I will start writing gdb-stub for target > side. I will be waiting for u r reply. I'm not familiar with the ADS compiler; it may be generating Dwarf 2 information that GDB cannot handle. The Dwarf 2 information in an executable's .debug_info section is divided into a series of "compilation units". Each compilation unit is a tree of "DIEs" (Debugging Information Entries)". Dwarf 2 allows dies in one compilation unit to point to dies in other compilation units, but GDB does not support this yet. You might try running 'readelf -wi' on your executable, and looking at the die for the variable you're trying to print. If it includes a reference printed as '<#number>' instead of '', then that is an inter-compilation-unit reference. If that is the case, then you might check out the GDB branch "drow_intercu-20040221-branch" and try that debugger. Follow the instructions to login on this page: http://sources.redhat.com/gdb/current and then check out the sources using this command: cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/src co -r drow_intercu-20040221-branch gdb+dejagnu I'd be interested to see the output from 'readelf -wi'; if it's not too huge, could you post it here?