summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Fleming <matt@console-pimps.org>2009-08-15 00:04:00 +0100
committerPaul Mundt <lethal@linux-sh.org>2009-08-15 08:07:43 +0900
commit180aa6e6aa11922dcd4c13df1967d62bb2ede76c (patch)
treee7f4a2c3bd38df81ada3b89fc38fd5b9e17fb707
parent7dd6662a92fe9a15ad565045aa60367995cc533d (diff)
downloadlinux-3.10-180aa6e6aa11922dcd4c13df1967d62bb2ede76c.tar.gz
linux-3.10-180aa6e6aa11922dcd4c13df1967d62bb2ede76c.tar.bz2
linux-3.10-180aa6e6aa11922dcd4c13df1967d62bb2ede76c.zip
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 <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/kernel/dwarf.c1
1 files changed, 1 insertions, 0 deletions
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: