summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruna Moreira <bruna.moreira@openbossa.org>2008-04-21 13:43:18 -0600
committerDavid Mosberger-Tang <davidm@koala.mostang.com>2008-04-21 13:43:18 -0600
commit1eddefc371c80012e0299eec78805dedfed89a89 (patch)
tree2c21ab6ac047bc0bbbb4dad41d9697c4b93225a2
parent6f282a00f55d0bc11f131da5d3591a1a4030a9f9 (diff)
downloadlibunwind-1eddefc371c80012e0299eec78805dedfed89a89.tar.gz
[ARM] This patch add some missing bits on ARM platform.
* src/arm/unwind_i (arm_lock, arm_local_resume): Define. * src/ptrace/_UPT_find_proc_info.c: Handle ARM like X86 etc. * tests/flush-cache.S (flush_cache): Add (dummy) ARM-version. ARM does need executable stack, even on Linux... Signed-off-by: Anderson Lizardo <anderson.lizardo@indt.org.br> Signed-off-by: Bruna Moreira <bruna.moreira@indt.org.br>
-rw-r--r--src/arm/unwind_i.h2
-rw-r--r--src/ptrace/_UPT_find_proc_info.c3
-rw-r--r--tests/flush-cache.S8
3 files changed, 11 insertions, 2 deletions
diff --git a/src/arm/unwind_i.h b/src/arm/unwind_i.h
index f0949fa5..315aeb2d 100644
--- a/src/arm/unwind_i.h
+++ b/src/arm/unwind_i.h
@@ -32,6 +32,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "libunwind_i.h"
+#define arm_lock UNW_OBJ(lock)
+#define arm_local_resume UNW_OBJ(local_resume)
#define arm_local_addr_space_init UNW_OBJ(local_addr_space_init)
extern void arm_local_addr_space_init (void);
diff --git a/src/ptrace/_UPT_find_proc_info.c b/src/ptrace/_UPT_find_proc_info.c
index 9f4ed380..67caabad 100644
--- a/src/ptrace/_UPT_find_proc_info.c
+++ b/src/ptrace/_UPT_find_proc_info.c
@@ -145,7 +145,8 @@ _UPTi_find_unwind_table (struct UPT_info *ui, unw_addr_space_t as,
return &ui->di_cache;
}
-#elif UNW_TARGET_X86 || UNW_TARGET_X86_64 || UNW_TARGET_HPPA || UNW_TARGET_PPC64
+#elif UNW_TARGET_X86 || UNW_TARGET_X86_64 || UNW_TARGET_HPPA \
+|| UNW_TARGET_PPC64 || UNW_TARGET_ARM
#include "dwarf-eh.h"
#include "dwarf_i.h"
diff --git a/tests/flush-cache.S b/tests/flush-cache.S
index d996492f..2a17165e 100644
--- a/tests/flush-cache.S
+++ b/tests/flush-cache.S
@@ -66,11 +66,17 @@ flush_cache:
lwz 31, -4(11) ;
mr 1, 11 ;
blr
+#elif defined(__arm__)
+ .text
+ .globl flush_cache
+flush_cache:
+ bx lr
+
#else
# error Need flush_cache code for this architecture.
#endif
-#ifdef __linux__
+#if defined ( __linux__) && !defined (__arm__)
/* We do not need executable stack. */
.section .note.GNU-stack,"",@progbits
#endif