mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-15 09:55:36 +00:00
sh: unwinder: Set the flags for DW_CFA_val_offset ops as DWARF_VAL_OFFSET
The handling of DW_CFA_val_offset ops was incorrectly using the DWARF_REG_OFFSET flag but the register's value cannot be calculated using the DWARF_REG_OFFSET method. Create a new flag to indicate that a different method must be used to calculate the register's value even though there is no implementation for DWARF_VAL_OFFSET yet; it's mainly just a place holder. Signed-off-by: Matt Fleming <matt@console-pimps.org>
This commit is contained in:
parent
fb3f3e7fc6
commit
97efbbd588
@ -296,6 +296,7 @@ struct dwarf_reg {
|
|||||||
unsigned long addr;
|
unsigned long addr;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
#define DWARF_REG_OFFSET (1 << 0)
|
#define DWARF_REG_OFFSET (1 << 0)
|
||||||
|
#define DWARF_VAL_OFFSET (1 << 1)
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
*
|
*
|
||||||
* TODO:
|
* TODO:
|
||||||
* - DWARF64 doesn't work.
|
* - DWARF64 doesn't work.
|
||||||
|
* - Registers with DWARF_VAL_OFFSET rules aren't handled properly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* #define DEBUG */
|
/* #define DEBUG */
|
||||||
@ -499,7 +500,7 @@ static int dwarf_cfa_execute_insns(unsigned char *insn_start,
|
|||||||
count = dwarf_read_leb128(current_insn, &offset);
|
count = dwarf_read_leb128(current_insn, &offset);
|
||||||
offset *= cie->data_alignment_factor;
|
offset *= cie->data_alignment_factor;
|
||||||
regp = dwarf_frame_alloc_reg(frame, reg);
|
regp = dwarf_frame_alloc_reg(frame, reg);
|
||||||
regp->flags |= DWARF_REG_OFFSET;
|
regp->flags |= DWARF_VAL_OFFSET;
|
||||||
regp->addr = offset;
|
regp->addr = offset;
|
||||||
break;
|
break;
|
||||||
case DW_CFA_GNU_args_size:
|
case DW_CFA_GNU_args_size:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user