aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMatt Fleming <matt@console-pimps.org>2009-08-16 10:56:35 -0400
committerMatt Fleming <matt@console-pimps.org>2009-08-21 08:02:44 -0400
commit97efbbd5886e27b61c19c77d41f6491f5d96fbd0 (patch)
tree02fbb8fcedfcb1a3e6bff73b1cd5da133cea5957 /arch
parentfb3f3e7fc6d4afb32f9eba32124beaf40313de3c (diff)
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/include/asm/dwarf.h1
-rw-r--r--arch/sh/kernel/dwarf.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/sh/include/asm/dwarf.h b/arch/sh/include/asm/dwarf.h
index a22fbe98303f..8b0bcc087385 100644
--- a/arch/sh/include/asm/dwarf.h
+++ b/arch/sh/include/asm/dwarf.h
@@ -296,6 +296,7 @@ struct dwarf_reg {
296 unsigned long addr; 296 unsigned long addr;
297 unsigned long flags; 297 unsigned long flags;
298#define DWARF_REG_OFFSET (1 << 0) 298#define DWARF_REG_OFFSET (1 << 0)
299#define DWARF_VAL_OFFSET (1 << 1)
299}; 300};
300 301
301/* 302/*
diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c
index e4810375207d..d271d04adccd 100644
--- a/arch/sh/kernel/dwarf.c
+++ b/arch/sh/kernel/dwarf.c
@@ -11,6 +11,7 @@
11 * 11 *
12 * TODO: 12 * TODO:
13 * - DWARF64 doesn't work. 13 * - DWARF64 doesn't work.
14 * - Registers with DWARF_VAL_OFFSET rules aren't handled properly.
14 */ 15 */
15 16
16/* #define DEBUG */ 17/* #define DEBUG */
@@ -499,7 +500,7 @@ static int dwarf_cfa_execute_insns(unsigned char *insn_start,
499 count = dwarf_read_leb128(current_insn, &offset); 500 count = dwarf_read_leb128(current_insn, &offset);
500 offset *= cie->data_alignment_factor; 501 offset *= cie->data_alignment_factor;
501 regp = dwarf_frame_alloc_reg(frame, reg); 502 regp = dwarf_frame_alloc_reg(frame, reg);
502 regp->flags |= DWARF_REG_OFFSET; 503 regp->flags |= DWARF_VAL_OFFSET;
503 regp->addr = offset; 504 regp->addr = offset;
504 break; 505 break;
505 case DW_CFA_GNU_args_size: 506 case DW_CFA_GNU_args_size: