Wed 05 May 2010 07:13:26 PM UTC, comment #5:
1. Coding style is GNU with spaces
Some patches with tabs went into the repo, but they should be treated as
bugs and hopefully will be fixed over time.
2. Why not put this in tdep/libunwind_i.h?
--- libunwind.orig/include/libunwind_i.h 2010-04-14 22:11:29.000000000 +0300
+++ libunwind/include/libunwind_i.h 2010-05-03 13:13:30.000000000 +0300
@@ -301,6 +301,18 @@
size_t size; /* (file-) size of the image */
};
+/* unwinding method selection support */
+#define UNW_ARM_METHOD_ALL 0xFF
+#define UNW_ARM_METHOD_DWARF 0x01
+#define UNW_ARM_METHOD_FRAME 0x02
+
+#if UNW_TARGET_ARM
+#define unwi_unwind_method UNWI_ARCH_OBJ(unwind_method)
+extern int unwi_unwind_method;
+#endif
+
+#define UNW_TRY_METHOD(x) (unwi_unwind_method & x)
+
#include "tdep/libunwind_i.h"
3. This code really belongs in src/arm/Ginit.c
--- libunwind.orig/src/mi/init.c 2010-04-14 22:11:29.000000000 +0300
+++ libunwind/src/mi/init.c 2010-05-03 13:13:30.000000000 +0300
@@ -40,6 +40,11 @@
#endif /* UNW_DEBUG */
+#if UNW_TARGET_ARM
+/* Unwinding methods to use. See UNW_METHOD_ enums */
+int unwi_unwind_method = UNW_ARM_METHOD_ALL;
+#endif
+
HIDDEN void
mi_init (void)
{
@@ -56,5 +61,15 @@
}
#endif
+#if UNW_TARGET_ARM
+ {
+ const char* str = getenv ("UNW_ARM_UNWIND_METHOD");
+ if (str)
+ {
+ unwi_unwind_method = atoi (str);
+ }
+ }
+#endif
+
3. Namespace issues
I think run-check-namespaces will still fail on ARM. Please use static scope
or HIDDEN to limit symbol visibility.
4. Please add a commit message to each of the patches.
Giving me a mbox of patches or pointing me at a git tree I can pull from
will speed up the review.
5. dwarf_find_debug_frame could you move it under CONFIG_DEBUG_FRAME?
6. ia64 doesn't use dwarf. Why is this ifdef needed?
--- libunwind.orig/src/dwarf/Gparser.c 2010-04-14 22:11:29.000000000 +0300
+++ libunwind/src/dwarf/Gparser.c 2010-05-03 13:10:08.000000000 +0300
@@ -73,6 +73,14 @@
as = c->as;
arg = c->as_arg;
+#ifndef UNW_TARGET_IA64
+ if (c->pi.flags & UNW_PI_FLAG_DEBUG_FRAME)
+ {
+ /* .debug_frame CFI is stored in local address space. */
+ as = unw_local_addr_space;
+ arg = NULL;
+ }
+#endif
a = unw_get_accessors (as);
curr_ip = c->pi.start_ip;
|