This is the mail archive of the binutils@sourceware.org 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]

[avr] gas support for cfi info


On 02/15/2011 09:41 AM, Richard Henderson wrote:
> On 02/13/2011 07:10 AM, Petr HluzÃn wrote:
>> http://xfree86.cygwin.ru/ml/binutils/2010-08/msg00109.html
> 
> I'll agree that a better error message would be helpful.
> 
> To answer a question within that message:
> 
>> By the way: Why AVR target does not understand CFI? What needs to be
>> done in binutils? And in GDB?
> 
>   TARGET_USE_CFIPOP
>   DWARF2_DEFAULT_RETURN_COLUMN
>   DWARF2_CIE_DATA_ALIGNMENT
>   DWARF2_LINE_MIN_INSN_LENGTH
> 
> are the macros that need to be defined,
> 
>   tc_cfi_frame_initial_instructions
> 
> may be required depending on what the state of the unwind
> info incoming to a function.  Have a look at tc-i386.c,
> tc_x86_frame_initial_instructions for a typical stack-based
> call mechanism.
> 
> For the nearly related task of dwarf2 line numbers, you need
> a call to dwarf2_emit_insn emitted immediately before each
> insn is added to the frags.  Again, see tc-i386.c for ideas.

To follow up on myself, it appears as if avr already has dwarf2
line number support, and only needs a few things in order to
enable cfi support.

CC'd to gcc and gdb because the dwarf2 register numbers for SP
and the return address column need to be coordinated.  This is
part of the target's ABI.

I've left a ??? marker for when AVR_3_BYTE_PC would be true in
gcc; I haven't tracked down how that maps into the assembler,
or even if there is a simple mapping.


r~

Attachment: zz
Description: Text document


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