[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH 13/27] Allow for architecture specific dwarf_to
From: |
Tommi Rantala |
Subject: |
[Libunwind-devel] [PATCH 13/27] Allow for architecture specific dwarf_to_unw_regnum() |
Date: |
Wed, 22 Aug 2012 14:28:39 +0300 |
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.
---
include/dwarf_i.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/dwarf_i.h b/include/dwarf_i.h
index d01eab8..77f52fe 100644
--- a/include/dwarf_i.h
+++ b/include/dwarf_i.h
@@ -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
--
1.7.9.5
- [Libunwind-devel] [PATCH 00/27] Misc fixes II, Tommi Rantala, 2012/08/22
- [Libunwind-devel] [PATCH 04/27] Add PPC namespace checking, Tommi Rantala, 2012/08/22
- [Libunwind-devel] [PATCH 05/27] Ignore _fbss, _fdata, _ftext and _gp symbols on MIPS, Tommi Rantala, 2012/08/22
- [Libunwind-devel] [PATCH 08/27] Update .gitignore, Tommi Rantala, 2012/08/22
- [Libunwind-devel] [PATCH 11/27] MIPS: fix symbol naming for `mips_lock', `mips_local_resume', and `mips_local_addr_space_init', Tommi Rantala, 2012/08/22
- [Libunwind-devel] [PATCH 15/27] MIPS: implement dwarf_to_unw_regnum() macro without table, Tommi Rantala, 2012/08/22
- [Libunwind-devel] [PATCH 13/27] Allow for architecture specific dwarf_to_unw_regnum(),
Tommi Rantala <=
- [Libunwind-devel] [PATCH 12/27] PPC: do not export dwarf_to_unw_regnum_map, Tommi Rantala, 2012/08/22
- [Libunwind-devel] [PATCH 10/27] Stop using nonportable echo arguments in tests, Tommi Rantala, 2012/08/22
- [Libunwind-devel] [PATCH 14/27] ARM: implement dwarf_to_unw_regnum() macro without table, Tommi Rantala, 2012/08/22
- [Libunwind-devel] [PATCH 17/27] Use constants for ELF magic bytes in _UCD_create.c, Tommi Rantala, 2012/08/22
- [Libunwind-devel] [PATCH 23/27] Avoid -Wunused-value warning in tests/Gtest-exc.c, Tommi Rantala, 2012/08/22
- [Libunwind-devel] [PATCH 18/27] Remove unneeded length modifier from suppressed match in sscanf() format in tests/crasher.c, Tommi Rantala, 2012/08/22
- [Libunwind-devel] [PATCH 19/27] Fix memory leaks in unw_create_addr_space() wrong-endian error paths, Tommi Rantala, 2012/08/22
- [Libunwind-devel] [PATCH 16/27] Fix plain return from main() in tests/test-async-sig.c, Tommi Rantala, 2012/08/22
- [Libunwind-devel] [PATCH 22/27] test-resume-sig-rt: test unw_resume() in presence of "realtime" signal frame, Tommi Rantala, 2012/08/22