Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e951f60e authored by Colin Cross's avatar Colin Cross
Browse files

Use arch flags instead of TARGET_ARCH_VARIANT, and add support for VFP_D16

Change-Id: I6007ff21076e92b04a17fb030472a9f8842f0315
parent 7df6349a
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -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
+10 −2
Original line number Diff line number Diff line
@@ -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]);
+2 −0
Original line number Diff line number Diff line
@@ -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