unwind.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * arch/arm/include/asm/unwind.h
  3. *
  4. * Copyright (C) 2008 ARM Limited
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. */
  19. #ifndef __ASM_UNWIND_H
  20. #define __ASM_UNWIND_H
  21. #ifndef __ASSEMBLY__
  22. /* Unwind reason code according the the ARM EABI documents */
  23. enum unwind_reason_code {
  24. URC_OK = 0, /* operation completed successfully */
  25. URC_CONTINUE_UNWIND = 8,
  26. URC_FAILURE = 9 /* unspecified failure of some kind */
  27. };
  28. struct unwind_idx {
  29. unsigned long addr_offset;
  30. unsigned long insn;
  31. };
  32. struct unwind_table {
  33. struct list_head list;
  34. const struct unwind_idx *start;
  35. const struct unwind_idx *origin;
  36. const struct unwind_idx *stop;
  37. unsigned long begin_addr;
  38. unsigned long end_addr;
  39. };
  40. extern struct unwind_table *unwind_table_add(unsigned long start,
  41. unsigned long size,
  42. unsigned long text_addr,
  43. unsigned long text_size);
  44. extern void unwind_table_del(struct unwind_table *tab);
  45. extern void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk);
  46. #endif /* !__ASSEMBLY__ */
  47. #ifdef CONFIG_ARM_UNWIND
  48. #define UNWIND(code...) code
  49. #else
  50. #define UNWIND(code...)
  51. #endif
  52. #endif /* __ASM_UNWIND_H */