aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMatt Fleming <matt@console-pimps.org>2009-08-14 19:04:00 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-08-14 19:07:43 -0400
commit180aa6e6aa11922dcd4c13df1967d62bb2ede76c (patch)
treee7f4a2c3bd38df81ada3b89fc38fd5b9e17fb707 /arch
parent7dd6662a92fe9a15ad565045aa60367995cc533d (diff)
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>
Diffstat (limited to 'arch')
-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 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,
449 count = dwarf_read_uleb128(current_insn, 449 count = dwarf_read_uleb128(current_insn,
450 &frame->cfa_register); 450 &frame->cfa_register);
451 current_insn += count; 451 current_insn += count;
452 frame->cfa_offset = 0;
452 frame->flags |= DWARF_FRAME_CFA_REG_OFFSET; 453 frame->flags |= DWARF_FRAME_CFA_REG_OFFSET;
453 break; 454 break;
454 case DW_CFA_def_cfa_offset: 455 case DW_CFA_def_cfa_offset: