diff options
Diffstat (limited to 'debuggerd')
-rw-r--r-- | debuggerd/Android.mk | 6 | ||||
-rw-r--r-- | debuggerd/arm64/machine.cpp | 2 | ||||
-rw-r--r-- | debuggerd/crasher.c | 14 |
3 files changed, 10 insertions, 12 deletions
diff --git a/debuggerd/Android.mk b/debuggerd/Android.mk index f6d8f0c..8be3541 100644 --- a/debuggerd/Android.mk +++ b/debuggerd/Android.mk @@ -20,8 +20,7 @@ LOCAL_CPPFLAGS := -std=gnu++11 LOCAL_CFLAGS := \ -Wall \ -Wno-array-bounds \ - -Werror \ - -Wno-unused-parameter \ + -Werror ifeq ($(ARCH_ARM_HAVE_VFP),true) LOCAL_CFLAGS_arm += -DWITH_VFP @@ -55,7 +54,7 @@ LOCAL_SRC_FILES_x86 := x86/crashglue.S LOCAL_SRC_FILES_x86_64 := x86_64/crashglue.S LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) LOCAL_MODULE_TAGS := optional -LOCAL_CFLAGS += -fstack-protector-all -Wno-unused-parameter -Wno-free-nonheap-object +LOCAL_CFLAGS += -fstack-protector-all -Werror -Wno-free-nonheap-object #LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_SHARED_LIBRARIES := libcutils liblog libc @@ -76,6 +75,7 @@ ifeq ($(ARCH_ARM_HAVE_VFP_D32),true) LOCAL_CFLAGS_arm += -DWITH_VFP_D32 endif # ARCH_ARM_HAVE_VFP_D32 endif # ARCH_ARM_HAVE_VFP == true +LOCAL_CFLAGS += -Werror LOCAL_SRC_FILES_arm64 := arm64/vfp.S LOCAL_MODULE_TARGET_ARCH += arm64 diff --git a/debuggerd/arm64/machine.cpp b/debuggerd/arm64/machine.cpp index 7159228..2413d5e 100644 --- a/debuggerd/arm64/machine.cpp +++ b/debuggerd/arm64/machine.cpp @@ -82,8 +82,6 @@ void dump_registers(log_t* log, pid_t tid, int scope_flags) io.iov_base = &r; io.iov_len = sizeof(r); - bool only_in_tombstone = !IS_AT_FAULT(scope_flags); - if (ptrace(PTRACE_GETREGSET, tid, (void*) NT_PRSTATUS, (void*) &io) == -1) { _LOG(log, scope_flags, "ptrace error: %s\n", strerror(errno)); return; diff --git a/debuggerd/crasher.c b/debuggerd/crasher.c index 3e3ab5a..01ce0be 100644 --- a/debuggerd/crasher.c +++ b/debuggerd/crasher.c @@ -6,13 +6,18 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <sys/cdefs.h> #include <sys/ptrace.h> #include <sys/socket.h> #include <sys/wait.h> #include <unistd.h> -#include <cutils/log.h> #include <cutils/sockets.h> +#include <log/log.h> + +#ifndef __unused +#define __unused __attribute__((__unused__)) +#endif extern const char* __progname; @@ -26,7 +31,7 @@ static void maybe_abort() { } } -static int smash_stack(int i) { +static int smash_stack(int i __unused) { printf("crasher: deliberately corrupting stack...\n"); // Unless there's a "big enough" buffer on the stack, gcc // doesn't bother inserting checks. @@ -47,11 +52,6 @@ __attribute__((noinline)) static void overflow_stack(void* p) { overflow_stack(&buf); } -static void test_call1() -{ - *((int*) 32) = 1; -} - static void *noisy(void *x) { char c = (uintptr_t) x; |