libunwind-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]