Skip to content

Commit

Permalink
sh: Set the cfa_offset to 0 if we see a DW_CFA_def_cfa_register op
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matt Fleming authored and Paul Mundt committed Aug 14, 2009
1 parent 7dd6662 commit 180aa6e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/sh/kernel/dwarf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 180aa6e

Please sign in to comment.