mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-12-22 19:43:42 +01:00
Allow for architecture specific dwarf_to_unw_regnum()
For a few of the supported architectures we can use one-to-one mapping from the dwarf to the libunwind register numbers. Allow the architectures to define their own dwarf_to_unw_regnum() macro to do this easily.
This commit is contained in:
parent
54a096a5af
commit
6a5da54b8a
1 changed files with 4 additions and 4 deletions
|
@ -15,13 +15,13 @@
|
|||
# define dwarf_addr_size(as) (sizeof (unw_word_t))
|
||||
#endif
|
||||
|
||||
#define dwarf_to_unw_regnum_map UNW_OBJ (dwarf_to_unw_regnum_map)
|
||||
|
||||
#ifndef dwarf_to_unw_regnum
|
||||
# define dwarf_to_unw_regnum_map UNW_OBJ (dwarf_to_unw_regnum_map)
|
||||
extern uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH];
|
||||
|
||||
/* REG is evaluated multiple times; it better be side-effects free! */
|
||||
#define dwarf_to_unw_regnum(reg) \
|
||||
# define dwarf_to_unw_regnum(reg) \
|
||||
(((reg) <= DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0)
|
||||
#endif
|
||||
|
||||
#ifdef UNW_LOCAL_ONLY
|
||||
|
||||
|
|
Loading…
Reference in a new issue