aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/dwarf.h
diff options
context:
space:
mode:
authorMatt Fleming <matt@console-pimps.org>2009-10-09 18:20:54 -0400
committerMatt Fleming <matt@console-pimps.org>2009-10-11 11:41:44 -0400
commita6a2f2ad67506090e332f440457553c0ec011d68 (patch)
treecfe974784b68cc3c09ed76e449a31d536b2b4589 /arch/sh/include/asm/dwarf.h
parentc153a58e715e16ffcd6c4b3da7fc6b4a556bf917 (diff)
sh: Teach the DWARF unwinder about modules
Pass a module's .eh_frame section to the DWARF unwinder at module load time so that the section's FDEs and CIEs can be registered with the DWARF unwinder. This allows us to unwind the stack through module code when generating backtraces. Signed-off-by: Matt Fleming <matt@console-pimps.org>
Diffstat (limited to 'arch/sh/include/asm/dwarf.h')
-rw-r--r--arch/sh/include/asm/dwarf.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/sh/include/asm/dwarf.h b/arch/sh/include/asm/dwarf.h
index c367ed3373c5..aacdc746d07c 100644
--- a/arch/sh/include/asm/dwarf.h
+++ b/arch/sh/include/asm/dwarf.h
@@ -241,6 +241,12 @@ struct dwarf_cie {
241 241
242 unsigned long flags; 242 unsigned long flags;
243#define DWARF_CIE_Z_AUGMENTATION (1 << 0) 243#define DWARF_CIE_Z_AUGMENTATION (1 << 0)
244
245 /*
246 * 'mod' will be non-NULL if this CIE came from a module's
247 * .eh_frame section.
248 */
249 struct module *mod;
244}; 250};
245 251
246/** 252/**
@@ -255,6 +261,12 @@ struct dwarf_fde {
255 unsigned char *instructions; 261 unsigned char *instructions;
256 unsigned char *end; 262 unsigned char *end;
257 struct list_head link; 263 struct list_head link;
264
265 /*
266 * 'mod' will be non-NULL if this FDE came from a module's
267 * .eh_frame section.
268 */
269 struct module *mod;
258}; 270};
259 271
260/** 272/**
@@ -364,6 +376,9 @@ static inline unsigned int DW_CFA_operand(unsigned long insn)
364 376
365extern struct dwarf_frame *dwarf_unwind_stack(unsigned long, 377extern struct dwarf_frame *dwarf_unwind_stack(unsigned long,
366 struct dwarf_frame *); 378 struct dwarf_frame *);
379extern int dwarf_parse_section(char *, char *, struct module *);
380extern void dwarf_module_unload(struct module *);
381
367#endif /* !__ASSEMBLY__ */ 382#endif /* !__ASSEMBLY__ */
368 383
369#define CFI_STARTPROC .cfi_startproc 384#define CFI_STARTPROC .cfi_startproc