From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5590 invoked by alias); 9 Sep 2002 12:31:43 -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 5546 invoked from network); 9 Sep 2002 12:31:35 -0000 Received: from unknown (HELO imag.imag.fr) (129.88.30.1) by sources.redhat.com with SMTP; 9 Sep 2002 12:31:35 -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 g89CVXa22895; Mon, 9 Sep 2002 14:31:33 +0200 (MEST) Received: from imag.fr (conque.imag.fr [129.88.38.148]) by horus.imag.fr (8.11.6/8.11.6/Imag.pm.V2) with ESMTP id g89CVXf06579; Mon, 9 Sep 2002 14:31:33 +0200 (MEST) Message-ID: <3D7C94A8.6EA8395E@imag.fr> Date: Mon, 09 Sep 2002 05:31:00 -0000 From: Pierre Habraken Organization: =?iso-8859-1?Q?Universit=E9?= Joseph Fourier X-Accept-Language: en MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: Gdb does not list .S files Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2002-09/txt/msg00050.txt.bz2 Hello, I am debugging a program compiled from C and Arm assembly language source files, using the simulator (target sim) of arm-elf-gdb (compiled on 23 august 2002 from cvs repository). As long as no breakpoint has been declared within a given assembly language file the contents of that file can NOT be listed. Is this a feature or am I doing something wrong ? How can one obtain the list of ALL source files, assembly language as well as C language, right after gdb has been started ? Thanks in advance for any suggestion, Pierre ===================================================================== The source files of the program are: noyau.c, taches.c, startup.S and swi.S. C files are compiled using arm-elf-gcc with options -gdwarf-2 -g3. Assembly language files are assembled using arm-elf-as invoked through arm-elf-gcc with options -Wa,--gdwarf2,-L. After launching arm-elf-gdb the following commands are executed (from .gdbinit): file noyau target sim load noyau Then, asking for the list of source files return C source file names only: (gdb) info sources Source files for which symbols have been read in: Source files for which symbols will be read in on demand: ../../gcc-3.2/gcc/libgcc2.c, dp-bit.c, ../../../../../newlib-1.10.0/newlib/libc/reent/readr.c, < a lot of newlib C files > ../../../../../newlib-1.10.0/newlib/libc/stdlib/calloc.c, ../../../../../newlib-1.10.0/newlib/libc/stdlib/atexit.c, , taches.c, noyau.c Thus, I can NOT list any assembly language source file : (gdb) list swi.S:1 No source file named swi.S. However, asking for a breakpoint in the same .S file is acknowledged: (gdb) break traitantSWI Breakpoint 1 at 0x105f0: file swi.S, line 91. If now I ask again for the list of source files, then swi.S (but not startup.S) is listed: (gdb) info sources Source files for which symbols have been read in: noyau.c, , swi.S ????????? ^^^^^ Source files for which symbols will be read in on demand: ../../gcc-3.2/gcc/libgcc2.c, dp-bit.c, ../../../../../newlib-1.10.0/newlib/libc/reent/readr.c, < all C source files > ...and swi.S contents can be listed...: (gdb) list swi.S:1 < a lot of comments > 87 .global traitantSWI 88 traitantSWI: 89 90 /* extraction code swi */ 91 ldr r13, [lr, #-4] 92 bic r13, r13, #0xFF000000 < ... > ...but not startup.S: (gdb) list startup.S:1 No source file named startup.S. ===================================================================== -- ________________________________________________________________________ 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 ________________________________________________________________________