From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28382 invoked by alias); 12 Sep 2002 09:42:49 -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 28369 invoked from network); 12 Sep 2002 09:42:47 -0000 Received: from unknown (HELO imag.imag.fr) (129.88.30.1) by sources.redhat.com with SMTP; 12 Sep 2002 09:42:47 -0000 Received: from horus.imag.fr (horus.imag.fr [129.88.38.1]) by imag.imag.fr (8.11.6/8.11.6) with ESMTP id g8C9gea23007; Thu, 12 Sep 2002 11:42:41 +0200 (MEST) Received: from imag.fr (habraken.ppp.imag.fr [129.88.13.43]) by horus.imag.fr (8.11.6/8.11.6/Imag.pm.V2) with ESMTP id g8C9gYf26390; Thu, 12 Sep 2002 11:42:35 +0200 (MEST) Message-ID: <3D806189.7A45FCBA@imag.fr> Date: Thu, 12 Sep 2002 02:42:00 -0000 From: Pierre Habraken Organization: =?iso-8859-1?Q?Universit=E9?= Joseph Fourier X-Accept-Language: en MIME-Version: 1.0 To: binutils@sources.redhat.com, gdb@sources.redhat.com CC: Richard.Earnshaw@arm.com Subject: Section .debug_info in object file Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2002-09/txt/msg00108.txt.bz2 A few days ago I posted a message about the fact that after launching gdb to debug a program made of several C and Arm assembly language files, the command 'info sources' lists C files only. Richard explained me that the section '.debug_info' in a given object file is supposed to contain a field (among others) named 'DW_AT_name' containing the name of the source file from which this object file was produced. It appears that assembly object files (at least those which are produced by Gas) does not include this field 'DW_AT_name' ; this could explain that gdb does not see assembly language source files at the time it opens the program being debugged. Knowing that rises several questions: - what is the structure of a '.debug_info' section ? Is this structure documented somewhere ? - which tool can be used to examine the contents of a '.debug_info' section ? I tried to use arm-elf-objdump but the result which it displays is not formatted and checking it is not easy... - is there a way to force gas to include a field 'DW_AT_name' in the object files it produces ? (an option on the command line ? a directive inside the source file ?) - why would gdb be not able to retrieve an assembly language source file (together with its name) as long as no breakpoint is set by the user within this file, where it is able to retrieve this same source file as soon as a first breakpoint is set (though the name of the source file is not present in the object file) ?... Thanks for any help. Pierre PS: I am using binutils 2.13 and gdb 5.2.1 compiled for arm-elf. -- ________________________________________________________________________ Pierre HABRAKEN - mailto:Pierre.Habraken@imag.fr Tél: 04 76 82 72 83 - Fax: 04 76 82 72 87 IMAG-LSR BP72 38402 SAINT MARTIN D'HERES Cedex ________________________________________________________________________