Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pierre Habraken <Pierre.Habraken@imag.fr>
To: gdb@sources.redhat.com
Subject: Gdb does not list .S files
Date: Mon, 09 Sep 2002 05:31:00 -0000	[thread overview]
Message-ID: <3D7C94A8.6EA8395E@imag.fr> (raw)

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
________________________________________________________________________


             reply	other threads:[~2002-09-09 12:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-09  5:31 Pierre Habraken [this message]
2002-09-09  7:17 ` Richard Earnshaw
2002-09-09  7:23   ` Pierre Habraken

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D7C94A8.6EA8395E@imag.fr \
    --to=pierre.habraken@imag.fr \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox