From 180aa6e6aa11922dcd4c13df1967d62bb2ede76c Mon Sep 17 00:00:00 2001 From: Matt Fleming Date: Sat, 15 Aug 2009 00:04:00 +0100 Subject: [PATCH] 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 --- arch/sh/kernel/dwarf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index db021361b161..c6c5764a8ab1 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: