diff options
author | Colin Cross | 2010-03-08 21:21:07 -0600 |
---|---|---|
committer | Colin Cross | 2010-03-10 16:36:08 -0600 |
commit | e951f60e77a986494fafeadf53ba726fe79c498d (patch) | |
tree | 345b610e8e391624466757ca1a16da304b88ed14 | |
parent | 7df6349a63b89d279131ec7dd7e6ef1b065854f5 (diff) | |
download | platform-system-core-e951f60e77a986494fafeadf53ba726fe79c498d.tar.gz platform-system-core-e951f60e77a986494fafeadf53ba726fe79c498d.tar.xz platform-system-core-e951f60e77a986494fafeadf53ba726fe79c498d.zip |
Use arch flags instead of TARGET_ARCH_VARIANT, and add support for VFP_D16
Change-Id: I6007ff21076e92b04a17fb030472a9f8842f0315
-rw-r--r-- | debuggerd/Android.mk | 17 | ||||
-rw-r--r-- | debuggerd/debuggerd.c | 12 | ||||
-rw-r--r-- | debuggerd/vfp.S | 2 |
3 files changed, 27 insertions, 4 deletions
diff --git a/debuggerd/Android.mk b/debuggerd/Android.mk index b86f2a57e..3c1cf024e 100644 --- a/debuggerd/Android.mk +++ b/debuggerd/Android.mk | |||
@@ -9,6 +9,13 @@ LOCAL_SRC_FILES:= debuggerd.c getevent.c unwind-arm.c pr-support.c utility.c | |||
9 | LOCAL_CFLAGS := -Wall | 9 | LOCAL_CFLAGS := -Wall |
10 | LOCAL_MODULE := debuggerd | 10 | LOCAL_MODULE := debuggerd |
11 | 11 | ||
12 | ifeq ($(ARCH_ARM_HAVE_VFP),true) | ||
13 | LOCAL_CFLAGS += -DWITH_VFP | ||
14 | endif # ARCH_ARM_HAVE_VFP | ||
15 | ifeq ($(ARCH_ARM_HAVE_VFP_D32),true) | ||
16 | LOCAL_CFLAGS += -DWITH_VFP_D32 | ||
17 | endif # ARCH_ARM_HAVE_VFP_D32 | ||
18 | |||
12 | LOCAL_STATIC_LIBRARIES := libcutils libc | 19 | LOCAL_STATIC_LIBRARIES := libcutils libc |
13 | 20 | ||
14 | include $(BUILD_EXECUTABLE) | 21 | include $(BUILD_EXECUTABLE) |
@@ -23,14 +30,20 @@ LOCAL_MODULE_TAGS := eng | |||
23 | LOCAL_SHARED_LIBRARIES := libcutils libc | 30 | LOCAL_SHARED_LIBRARIES := libcutils libc |
24 | include $(BUILD_EXECUTABLE) | 31 | include $(BUILD_EXECUTABLE) |
25 | 32 | ||
26 | ifeq ($(TARGET_ARCH_VARIANT),armv7-a) | 33 | ifeq ($(ARCH_ARM_HAVE_VFP),true) |
27 | include $(CLEAR_VARS) | 34 | include $(CLEAR_VARS) |
35 | |||
36 | LOCAL_CFLAGS += -DWITH_VFP | ||
37 | ifeq ($(ARCH_ARM_HAVE_VFP_D32),true) | ||
38 | LOCAL_CFLAGS += -DWITH_VFP_D32 | ||
39 | endif # ARCH_ARM_HAVE_VFP_D32 | ||
40 | |||
28 | LOCAL_SRC_FILES := vfp-crasher.c vfp.S | 41 | LOCAL_SRC_FILES := vfp-crasher.c vfp.S |
29 | LOCAL_MODULE := vfp-crasher | 42 | LOCAL_MODULE := vfp-crasher |
30 | LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) | 43 | LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) |
31 | LOCAL_MODULE_TAGS := eng | 44 | LOCAL_MODULE_TAGS := eng |
32 | LOCAL_SHARED_LIBRARIES := libcutils libc | 45 | LOCAL_SHARED_LIBRARIES := libcutils libc |
33 | include $(BUILD_EXECUTABLE) | 46 | include $(BUILD_EXECUTABLE) |
34 | endif # TARGET_ARCH_VARIANT == armv7-a | 47 | endif # ARCH_ARM_HAVE_VFP == true |
35 | 48 | ||
36 | endif # TARGET_ARCH == arm | 49 | endif # TARGET_ARCH == arm |
diff --git a/debuggerd/debuggerd.c b/debuggerd/debuggerd.c index 7b987cf91..e850a2e65 100644 --- a/debuggerd/debuggerd.c +++ b/debuggerd/debuggerd.c | |||
@@ -42,6 +42,14 @@ | |||
42 | 42 | ||
43 | #include "utility.h" | 43 | #include "utility.h" |
44 | 44 | ||
45 | #ifdef WITH_VFP | ||
46 | #ifdef WITH_VFP_D32 | ||
47 | #define NUM_VFP_REGS 32 | ||
48 | #else | ||
49 | #define NUM_VFP_REGS 16 | ||
50 | #endif | ||
51 | #endif | ||
52 | |||
45 | /* Main entry point to get the backtrace from the crashing process */ | 53 | /* Main entry point to get the backtrace from the crashing process */ |
46 | extern int unwind_backtrace_with_ptrace(int tfd, pid_t pid, mapinfo *map, | 54 | extern int unwind_backtrace_with_ptrace(int tfd, pid_t pid, mapinfo *map, |
47 | unsigned int sp_list[], | 55 | unsigned int sp_list[], |
@@ -278,7 +286,7 @@ void dump_registers(int tfd, int pid, bool at_fault) | |||
278 | " ip %08x sp %08x lr %08x pc %08x cpsr %08x\n", | 286 | " ip %08x sp %08x lr %08x pc %08x cpsr %08x\n", |
279 | r.ARM_ip, r.ARM_sp, r.ARM_lr, r.ARM_pc, r.ARM_cpsr); | 287 | r.ARM_ip, r.ARM_sp, r.ARM_lr, r.ARM_pc, r.ARM_cpsr); |
280 | 288 | ||
281 | #if __ARM_NEON__ | 289 | #ifdef WITH_VFP |
282 | struct user_vfp vfp_regs; | 290 | struct user_vfp vfp_regs; |
283 | int i; | 291 | int i; |
284 | 292 | ||
@@ -288,7 +296,7 @@ void dump_registers(int tfd, int pid, bool at_fault) | |||
288 | return; | 296 | return; |
289 | } | 297 | } |
290 | 298 | ||
291 | for (i = 0; i < 32; i += 2) { | 299 | for (i = 0; i < NUM_VFP_REGS; i += 2) { |
292 | _LOG(tfd, only_in_tombstone, | 300 | _LOG(tfd, only_in_tombstone, |
293 | " d%-2d %016llx d%-2d %016llx\n", | 301 | " d%-2d %016llx d%-2d %016llx\n", |
294 | i, vfp_regs.fpregs[i], i+1, vfp_regs.fpregs[i+1]); | 302 | i, vfp_regs.fpregs[i], i+1, vfp_regs.fpregs[i+1]); |
diff --git a/debuggerd/vfp.S b/debuggerd/vfp.S index 219241526..9744f6f74 100644 --- a/debuggerd/vfp.S +++ b/debuggerd/vfp.S | |||
@@ -19,6 +19,7 @@ crash: | |||
19 | fconstd d13, #13 | 19 | fconstd d13, #13 |
20 | fconstd d14, #14 | 20 | fconstd d14, #14 |
21 | fconstd d15, #15 | 21 | fconstd d15, #15 |
22 | #ifdef WITH_VFP_D32 | ||
22 | fconstd d16, #16 | 23 | fconstd d16, #16 |
23 | fconstd d17, #17 | 24 | fconstd d17, #17 |
24 | fconstd d18, #18 | 25 | fconstd d18, #18 |
@@ -35,6 +36,7 @@ crash: | |||
35 | fconstd d29, #29 | 36 | fconstd d29, #29 |
36 | fconstd d30, #30 | 37 | fconstd d30, #30 |
37 | fconstd d31, #31 | 38 | fconstd d31, #31 |
39 | #endif | ||
38 | mov r0, #0 | 40 | mov r0, #0 |
39 | str r0, [r0] | 41 | str r0, [r0] |
40 | bx lr | 42 | bx lr |