This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Gdb does not list .S files
- From: Pierre Habraken <Pierre dot Habraken at imag dot fr>
- To: binutils at sources dot redhat dot com
- Date: Mon, 09 Sep 2002 16:35:00 +0200
- Subject: Gdb does not list .S files
- Organization: Université Joseph Fourier
Hello,
I already posted this message to the gdb mailing list but forgot to send
a copy to binutils. Actually I do not know if the problem I describe is
relevant to Gas or to Gdb...
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, <unknown>, 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
________________________________________________________________________