]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/sh/include/asm/dwarf.h
Merge branch 'sh/dwarf-unwinder'
[karo-tx-linux.git] / arch / sh / include / asm / dwarf.h
index a22fbe98303fe848eff57b19911680cfe732d5d1..fc51e66f2380b3097ba6c43b87f0a1177906e072 100644 (file)
  */
 static __always_inline unsigned long dwarf_read_arch_reg(unsigned int reg)
 {
-       unsigned long value;
+       unsigned long value = 0;
 
        switch (reg) {
        case 14:
@@ -241,6 +241,12 @@ struct dwarf_cie {
 
        unsigned long flags;
 #define DWARF_CIE_Z_AUGMENTATION       (1 << 0)
+
+       /*
+        * 'mod' will be non-NULL if this CIE came from a module's
+        * .eh_frame section.
+        */
+       struct module *mod;
 };
 
 /**
@@ -255,6 +261,12 @@ struct dwarf_fde {
        unsigned char *instructions;
        unsigned char *end;
        struct list_head link;
+
+       /*
+        * 'mod' will be non-NULL if this FDE came from a module's
+        * .eh_frame section.
+        */
+       struct module *mod;
 };
 
 /**
@@ -296,6 +308,8 @@ struct dwarf_reg {
        unsigned long addr;
        unsigned long flags;
 #define DWARF_REG_OFFSET       (1 << 0)
+#define DWARF_VAL_OFFSET       (1 << 1)
+#define DWARF_UNDEFINED                (1 << 2)
 };
 
 /*
@@ -362,6 +376,10 @@ static inline unsigned int DW_CFA_operand(unsigned long insn)
 
 extern struct dwarf_frame *dwarf_unwind_stack(unsigned long,
                                              struct dwarf_frame *);
+extern void dwarf_free_frame(struct dwarf_frame *);
+extern int dwarf_parse_section(char *, char *, struct module *);
+extern void dwarf_module_unload(struct module *);
+
 #endif /* !__ASSEMBLY__ */
 
 #define CFI_STARTPROC  .cfi_startproc
@@ -369,6 +387,7 @@ extern struct dwarf_frame *dwarf_unwind_stack(unsigned long,
 #define CFI_DEF_CFA    .cfi_def_cfa
 #define CFI_REGISTER   .cfi_register
 #define CFI_REL_OFFSET .cfi_rel_offset
+#define CFI_UNDEFINED  .cfi_undefined
 
 #else
 
@@ -382,6 +401,7 @@ extern struct dwarf_frame *dwarf_unwind_stack(unsigned long,
 #define CFI_DEF_CFA    CFI_IGNORE
 #define CFI_REGISTER   CFI_IGNORE
 #define CFI_REL_OFFSET CFI_IGNORE
+#define CFI_UNDEFINED  CFI_IGNORE
 
 #ifndef __ASSEMBLY__
 static inline void dwarf_unwinder_init(void)