http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17994

Anitha Boyapati <anitha.boyapati at atmel dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anitha.boyapati at atmel
                   |                            |dot com

--- Comment #4 from Anitha Boyapati <anitha.boyapati at atmel dot com> 
2010-12-29 07:05:09 UTC ---
(In reply to comment #1)

> 3.) There seems to be only one little part missing in order to add the call 
> stack information as well: The back-end needs to provide the information at 
> which memory address the debugger could localize the return address. This 
> would 
> require to implement the target hook INCOMING_RETURN_ADDR_RTX and use the 
> RTX_FRAME_RELATED_P predicate for all of the prologue/epilogue insn. 


I know this has been delayed for too long. But I thought a small update would
perhaps help.

Looks like to get call-stack debug info, all we require to do is define
INCOMING_RETURN_ADDR_RTX. In AVR, since the return address is pushed onto the
stack for every call instruction, the above hook is defined to
avr_incoming_return_addr_rtx() of dwarf2out.c:

rtx
avr_incoming_return_addr_rtx(void) {

    return gen_rtx_MEM (HImode, stack_pointer_rtx);
}

And this gives an ICE in dwarf2out_frame_debug_expr(). Modifying the above
function to pre decrement the stack pointer gives an ICE in
initial_return_save()

gen_rtx_MEM (HImode, gen_rtx_PRE_DEC (HImode, stack_pointer_rtx))

Reply via email to