* Gdb does not list .S files
@ 2002-09-09 5:31 Pierre Habraken
2002-09-09 7:17 ` Richard Earnshaw
0 siblings, 1 reply; 3+ messages in thread
From: Pierre Habraken @ 2002-09-09 5:31 UTC (permalink / raw)
To: gdb
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, <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
________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Gdb does not list .S files
2002-09-09 5:31 Gdb does not list .S files Pierre Habraken
@ 2002-09-09 7:17 ` Richard Earnshaw
2002-09-09 7:23 ` Pierre Habraken
0 siblings, 1 reply; 3+ messages in thread
From: Richard Earnshaw @ 2002-09-09 7:17 UTC (permalink / raw)
To: Pierre Habraken; +Cc: gdb, Richard.Earnshaw
Pierre.Habraken@imag.fr said:
> 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 ?
If there's a problem anywhere it's in gas not in gdb. GDB doesn't know
about your assembly files because they contain no debug information.
R.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Gdb does not list .S files
2002-09-09 7:17 ` Richard Earnshaw
@ 2002-09-09 7:23 ` Pierre Habraken
0 siblings, 0 replies; 3+ messages in thread
From: Pierre Habraken @ 2002-09-09 7:23 UTC (permalink / raw)
To: Richard.Earnshaw; +Cc: gdb
Richard Earnshaw wrote:
>
> Pierre.Habraken@imag.fr said:
> > 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 ?
>
> If there's a problem anywhere it's in gas not in gdb. GDB doesn't know
> about your assembly files because they contain no debug information.
Ok. But I do not undestand what is the purpose of the gas option
--gdwarf2 ?...
Pierre
--
________________________________________________________________________
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
________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-09-09 14:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-09 5:31 Gdb does not list .S files Pierre Habraken
2002-09-09 7:17 ` Richard Earnshaw
2002-09-09 7:23 ` Pierre Habraken
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox