This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

debug/6434: Thumb compilation yields no DWARF FDE instructions



>Number:         6434
>Category:       debug
>Synopsis:       Thumb compilation produces no DWARF FDE instructions
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 24 04:56:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Francisco
>Release:        3.0.4 (DevKit-Advance)
>Organization:
Personal	
>Environment:
System: CYGWIN_NT-5.1 FRAN 1.3.10(0.51/3/2) 2002-02-25 11:14 i686 unknown


	
host: i686-pc-cygwin
build: i686-pc-cygwin
target: arm-agb-elf
configured with: ../gcc-3.0.4/configure --prefix=/devkitadv --build=i686-pc-cygwin --host=i686-pc-cygwin --target=arm-agb-elf --with-cpu=arm7tdmi --without-local-prefix --with-newlib --with-headers=../newlib-1.10.0/newlib/libc/include/ --enable-multilib --enable-interwork --enable-languages=c++ --enable-targets=arm-elf,arm-coff,arm-aout --disable-win32-registry --disable-threads -v
>Description:
 Code compiled with -marm correctly produces DWARF call frame instructions. Example:

00000608 00000020 0000034c FDE cie=0000034c pc=02001634..020016a0
  DW_CFA_advance_loc: 4 to 02001638
  DW_CFA_def_cfa_reg: r12
  DW_CFA_advance_loc: 4 to 0200163c
  DW_CFA_offset: r14 at cfa-8
  DW_CFA_offset: r13 at cfa-12
  DW_CFA_offset: r11 at cfa-16
  DW_CFA_advance_loc4: 4 to 02001640
  DW_CFA_def_cfa: r11 ofs 4
  DW_CFA_nop
  DW_CFA_nop

Code compiled with -mthumb doesn't contain any call frame instructions. Example:

0000063c 0000000c 0000062c FDE cie=0000062c pc=020016a0..020017a8


>How-To-Repeat:
 Compile the following simple example:
 
void a()
{
}

void main(int argc, char **argv)
{
 a();
}

Compile with -marm: gcc -c -marm -o test.o test.c
Check output with readelf -w and look at the .debug_frame section

Output correctly includes CFA instructions.

Now compile with -mthumb: gcc -c -mthumb -o test.o test.c
Check output with readelf -w and look at the .debug_frame section

Output is missing CFA instructions preventing a debugger to show call frame information.

>Fix:

Unknown.

>Release-Note:
>Audit-Trail:
>Unformatted:


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