bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/15281] New: [avr] DWARF CIE DW_CFA_def_cfa offset incorrect for


From: senthil.thecoder at gmail dot com
Subject: [Bug gas/15281] New: [avr] DWARF CIE DW_CFA_def_cfa offset incorrect for xmega devices with >128 KB flash
Date: Fri, 15 Mar 2013 12:57:43 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=15281



             Bug #: 15281

           Summary: [avr] DWARF CIE DW_CFA_def_cfa offset incorrect for

                    xmega devices with >128 KB flash

           Product: binutils

           Version: 2.24 (HEAD)

            Status: NEW

          Severity: normal

          Priority: P2

         Component: gas

        AssignedTo: address@hidden

        ReportedBy: address@hidden

    Classification: Unclassified





The cfa offset definition in the DWARF CIE for xmegas with flash greater th
an

128 KB is 2, instead of 3. For devices with > 128 KB flash, 3 bytes are pus
hed

on the stack as the return address, and hence the value of SP at the call s
ite

(CFA) will be at an offset of 3.



This works correctly for megas with flash >128 KB, as shown below (note the

value of ofs for DW_CFA_def_cfa



➜  scratch  cat test.c

int main()

{

    return 0;

}



➜  scratch  ~/avr/install/bin/avr-gcc -mmcu=atxmega192a3 -c -g3 t
est.c

➜  scratch  ~/avr/install/bin/avr-objdump -Wf test.o     
             



test.o:     file format elf32-avr



Contents of the .debug_frame section:



00000000 00000010 ffffffff CIE

  Version:               1

  Augmentation:          ""

  Code alignment factor: 2

  Data alignment factor: -1

  Return address column: 36



  DW_CFA_def_cfa: r32 ofs 2

  DW_CFA_offset: r36 at cfa-1

  DW_CFA_nop

  DW_CFA_nop

...



➜  scratch  ~/avr/install/bin/avr-gcc -mmcu=atmega2560 -c -g3 tes
t.c 

➜  scratch  ~/avr/install/bin/avr-objdump -Wf test.o     
           



test.o:     file format elf32-avr



Contents of the .debug_frame section:



00000000 00000010 ffffffff CIE

  Version:               1

  Augmentation:          ""

  Code alignment factor: 2

  Data alignment factor: -1

  Return address column: 36



  DW_CFA_def_cfa: r32 ofs 3

  DW_CFA_offset: r36 at cfa-2

  DW_CFA_nop

  DW_CFA_nop



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

------- You are receiving this mail because: -------

You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]