This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Gdb does not list .S files
- From: Richard Earnshaw <rearnsha at cambridge dot arm dot com>
- To: Pierre Habraken <Pierre dot Habraken at imag dot fr>
- Cc: binutils at sources dot redhat dot com, Richard dot Earnshaw at arm dot com
- Date: Mon, 09 Sep 2002 16:34:58 +0100
- Subject: Re: Gdb does not list .S files
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> 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,
OK, I've dug around in this some more. The reason it isn't added in the
initial scan of the program is that the object file does not have its name
set in the .debug_info section for the compilation unit. Compare the
following
assembler file:
<0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
DW_AT_stmt_list : 0
DW_AT_low_pc : 0 0
DW_AT_high_pc : 0x8 8
DW_AT_comp_dir : /tmp
DW_AT_producer : GNU AS 2.12.90
DW_AT_language : 32769 (MIPS assembler)
C file:
<0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
DW_AT_stmt_list : 0
DW_AT_high_pc : 0x18 24
DW_AT_low_pc : 0 0
DW_AT_name : (indirect string, offset: 0x0): main.c
DW_AT_comp_dir : (indirect string, offset: 0xc): /tmp
DW_AT_producer : (indirect string, offset: 0x11): GNU C 3.3
20020906 (ex
R.