From: Matt Fleming Date: Fri, 14 Aug 2009 23:04:00 +0000 (+0100) Subject: sh: Set the cfa_offset to 0 if we see a DW_CFA_def_cfa_register op X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=180aa6e6aa11922dcd4c13df1967d62bb2ede76c;p=mv-sheeva.git sh: Set the cfa_offset to 0 if we see a DW_CFA_def_cfa_register op The way that the CFA is calculated can change as we progress through a function. If we see a DW_CFA_def_cfa_register op we need to reset the frame's cfa_offset value which may have been previously setup. Signed-off-by: Matt Fleming Signed-off-by: Paul Mundt --- diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index db021361b16..c6c5764a8ab 100644 --- a/arch/sh/kernel/dwarf.c +++ b/arch/sh/kernel/dwarf.c @@ -449,6 +449,7 @@ static int dwarf_cfa_execute_insns(unsigned char *insn_start, count = dwarf_read_uleb128(current_insn, &frame->cfa_register); current_insn += count; + frame->cfa_offset = 0; frame->flags |= DWARF_FRAME_CFA_REG_OFFSET; break; case DW_CFA_def_cfa_offset: