This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Gdb does not list .S files


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]