aboutsummaryrefslogtreecommitdiffstats
path: root/debuggerd
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2010-03-08 19:21:07 -0800
committerColin Cross <ccross@android.com>2010-03-10 14:36:08 -0800
commite951f60e77a986494fafeadf53ba726fe79c498d (patch)
tree345b610e8e391624466757ca1a16da304b88ed14 /debuggerd
parent7df6349a63b89d279131ec7dd7e6ef1b065854f5 (diff)
downloadsystem_core-e951f60e77a986494fafeadf53ba726fe79c498d.tar.gz
system_core-e951f60e77a986494fafeadf53ba726fe79c498d.tar.bz2
system_core-e951f60e77a986494fafeadf53ba726fe79c498d.zip
Use arch flags instead of TARGET_ARCH_VARIANT, and add support for VFP_D16
Change-Id: I6007ff21076e92b04a17fb030472a9f8842f0315
Diffstat (limited to 'debuggerd')
-rw-r--r--debuggerd/Android.mk17
-rw-r--r--debuggerd/debuggerd.c12
-rw-r--r--debuggerd/vfp.S2
3 files changed, 27 insertions, 4 deletions
diff --git a/debuggerd/Android.mk b/debuggerd/Android.mk
index b86f2a57..3c1cf024 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
LOCAL_CFLAGS := -Wall
LOCAL_MODULE := debuggerd
+ifeq ($(ARCH_ARM_HAVE_VFP),true)
+LOCAL_CFLAGS += -DWITH_VFP
+endif # ARCH_ARM_HAVE_VFP
+ifeq ($(ARCH_ARM_HAVE_VFP_D32),true)
+LOCAL_CFLAGS += -DWITH_VFP_D32
+endif # ARCH_ARM_HAVE_VFP_D32
+
LOCAL_STATIC_LIBRARIES := libcutils libc
include $(BUILD_EXECUTABLE)
@@ -23,14 +30,20 @@ LOCAL_MODULE_TAGS := eng
LOCAL_SHARED_LIBRARIES := libcutils libc
include $(BUILD_EXECUTABLE)
-ifeq ($(TARGET_ARCH_VARIANT),armv7-a)
+ifeq ($(ARCH_ARM_HAVE_VFP),true)
include $(CLEAR_VARS)
+
+LOCAL_CFLAGS += -DWITH_VFP
+ifeq ($(ARCH_ARM_HAVE_VFP_D32),true)
+LOCAL_CFLAGS += -DWITH_VFP_D32
+endif # ARCH_ARM_HAVE_VFP_D32
+
LOCAL_SRC_FILES := vfp-crasher.c vfp.S
LOCAL_MODULE := vfp-crasher
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
LOCAL_MODULE_TAGS := eng
LOCAL_SHARED_LIBRARIES := libcutils libc
include $(BUILD_EXECUTABLE)
-endif # TARGET_ARCH_VARIANT == armv7-a
+endif # ARCH_ARM_HAVE_VFP == true
endif # TARGET_ARCH == arm
diff --git a/debuggerd/debuggerd.c b/debuggerd/debuggerd.c
index 7b987cf9..e850a2e6 100644
--- a/debuggerd/debuggerd.c
+++ b/debuggerd/debuggerd.c
@@ -42,6 +42,14 @@
#include "utility.h"
+#ifdef WITH_VFP
+#ifdef WITH_VFP_D32
+#define NUM_VFP_REGS 32
+#else
+#define NUM_VFP_REGS 16
+#endif
+#endif
+
/* Main entry point to get the backtrace from the crashing process */
extern int unwind_backtrace_with_ptrace(int tfd, pid_t pid, mapinfo *map,
unsigned int sp_list[],
@@ -278,7 +286,7 @@ void dump_registers(int tfd, int pid, bool at_fault)
" ip %08x sp %08x lr %08x pc %08x cpsr %08x\n",
r.ARM_ip, r.ARM_sp, r.ARM_lr, r.ARM_pc, r.ARM_cpsr);
-#if __ARM_NEON__
+#ifdef WITH_VFP
struct user_vfp vfp_regs;
int i;
@@ -288,7 +296,7 @@ void dump_registers(int tfd, int pid, bool at_fault)
return;
}
- for (i = 0; i < 32; i += 2) {
+ for (i = 0; i < NUM_VFP_REGS; i += 2) {
_LOG(tfd, only_in_tombstone,
" d%-2d %016llx d%-2d %016llx\n",
i, vfp_regs.fpregs[i], i+1, vfp_regs.fpregs[i+1]);
diff --git a/debuggerd/vfp.S b/debuggerd/vfp.S
index 21924152..9744f6f7 100644
--- a/debuggerd/vfp.S
+++ b/debuggerd/vfp.S
@@ -19,6 +19,7 @@ crash:
fconstd d13, #13
fconstd d14, #14
fconstd d15, #15
+#ifdef WITH_VFP_D32
fconstd d16, #16
fconstd d17, #17
fconstd d18, #18
@@ -35,6 +36,7 @@ crash:
fconstd d29, #29
fconstd d30, #30
fconstd d31, #31
+#endif
mov r0, #0
str r0, [r0]
bx lr