Loading debuggerd/Android.mk +17 −9 Original line number Diff line number Diff line Loading @@ -6,14 +6,20 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ backtrace.c \ debuggerd.c \ getevent.c \ tombstone.c \ utility.c \ $(TARGET_ARCH)/machine.c LOCAL_CFLAGS := -Wall -Wno-unused-parameter -std=gnu99 backtrace.cpp \ debuggerd.cpp \ getevent.cpp \ tombstone.cpp \ utility.cpp \ $(TARGET_ARCH)/machine.cpp \ LOCAL_CONLYFLAGS := -std=gnu99 LOCAL_CPPFLAGS := -std=gnu++11 LOCAL_CFLAGS := \ -Wall \ -Wno-array-bounds \ -Werror \ LOCAL_MODULE := debuggerd ifeq ($(ARCH_ARM_HAVE_VFP),true) Loading @@ -30,6 +36,8 @@ LOCAL_SHARED_LIBRARIES := \ liblog \ libselinux \ include external/stlport/libstlport.mk include $(BUILD_EXECUTABLE) include $(CLEAR_VARS) Loading @@ -38,7 +46,7 @@ LOCAL_SRC_FILES += $(TARGET_ARCH)/crashglue.S LOCAL_MODULE := crasher LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS += -fstack-protector-all LOCAL_CFLAGS += -fstack-protector-all -Wno-unused-parameter -Wno-free-nonheap-object #LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_SHARED_LIBRARIES := libcutils liblog libc include $(BUILD_EXECUTABLE) Loading debuggerd/arm/machine.c→debuggerd/arm/machine.cpp +0 −0 File moved. View file debuggerd/backtrace.c→debuggerd/backtrace.cpp +0 −0 File moved. View file debuggerd/debuggerd.c→debuggerd/debuggerd.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ static void wait_for_user_action(pid_t pid) { int _ = -dit; int ___ = 3*_; int _______ = 7*_; const signed char codes[] = { const int codes[] = { dit,_,dit,_,dit,___,dah,_,dah,_,dah,___,dit,_,dit,_,dit,_______ }; size_t s = 0; Loading @@ -132,7 +132,7 @@ static void wait_for_user_action(pid_t pid) { init_debug_led(); enable_debug_led(); do { int timeout = abs((int)(codes[s])) * ms; int timeout = abs(codes[s]) * ms; int res = get_event(&e, timeout); if (res == 0) { if (e.type == EV_KEY Loading debuggerd/getevent.c→debuggerd/getevent.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -54,13 +54,13 @@ static int open_device(const char *device) idstr[0] = '\0'; } new_ufds = realloc(ufds, sizeof(ufds[0]) * (nfds + 1)); new_ufds = reinterpret_cast<pollfd*>(realloc(ufds, sizeof(ufds[0]) * (nfds + 1))); if(new_ufds == NULL) { fprintf(stderr, "out of memory\n"); return -1; } ufds = new_ufds; new_device_names = realloc(device_names, sizeof(device_names[0]) * (nfds + 1)); new_device_names = reinterpret_cast<char**>(realloc(device_names, sizeof(device_names[0]) * (nfds + 1))); if(new_device_names == NULL) { fprintf(stderr, "out of memory\n"); return -1; Loading Loading @@ -162,7 +162,7 @@ int init_getevent() const char *device_path = "/dev/input"; nfds = 1; ufds = calloc(1, sizeof(ufds[0])); ufds = reinterpret_cast<pollfd*>(calloc(1, sizeof(ufds[0]))); ufds[0].fd = inotify_init(); ufds[0].events = POLLIN; Loading Loading
debuggerd/Android.mk +17 −9 Original line number Diff line number Diff line Loading @@ -6,14 +6,20 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ backtrace.c \ debuggerd.c \ getevent.c \ tombstone.c \ utility.c \ $(TARGET_ARCH)/machine.c LOCAL_CFLAGS := -Wall -Wno-unused-parameter -std=gnu99 backtrace.cpp \ debuggerd.cpp \ getevent.cpp \ tombstone.cpp \ utility.cpp \ $(TARGET_ARCH)/machine.cpp \ LOCAL_CONLYFLAGS := -std=gnu99 LOCAL_CPPFLAGS := -std=gnu++11 LOCAL_CFLAGS := \ -Wall \ -Wno-array-bounds \ -Werror \ LOCAL_MODULE := debuggerd ifeq ($(ARCH_ARM_HAVE_VFP),true) Loading @@ -30,6 +36,8 @@ LOCAL_SHARED_LIBRARIES := \ liblog \ libselinux \ include external/stlport/libstlport.mk include $(BUILD_EXECUTABLE) include $(CLEAR_VARS) Loading @@ -38,7 +46,7 @@ LOCAL_SRC_FILES += $(TARGET_ARCH)/crashglue.S LOCAL_MODULE := crasher LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS += -fstack-protector-all LOCAL_CFLAGS += -fstack-protector-all -Wno-unused-parameter -Wno-free-nonheap-object #LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_SHARED_LIBRARIES := libcutils liblog libc include $(BUILD_EXECUTABLE) Loading
debuggerd/debuggerd.c→debuggerd/debuggerd.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ static void wait_for_user_action(pid_t pid) { int _ = -dit; int ___ = 3*_; int _______ = 7*_; const signed char codes[] = { const int codes[] = { dit,_,dit,_,dit,___,dah,_,dah,_,dah,___,dit,_,dit,_,dit,_______ }; size_t s = 0; Loading @@ -132,7 +132,7 @@ static void wait_for_user_action(pid_t pid) { init_debug_led(); enable_debug_led(); do { int timeout = abs((int)(codes[s])) * ms; int timeout = abs(codes[s]) * ms; int res = get_event(&e, timeout); if (res == 0) { if (e.type == EV_KEY Loading
debuggerd/getevent.c→debuggerd/getevent.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -54,13 +54,13 @@ static int open_device(const char *device) idstr[0] = '\0'; } new_ufds = realloc(ufds, sizeof(ufds[0]) * (nfds + 1)); new_ufds = reinterpret_cast<pollfd*>(realloc(ufds, sizeof(ufds[0]) * (nfds + 1))); if(new_ufds == NULL) { fprintf(stderr, "out of memory\n"); return -1; } ufds = new_ufds; new_device_names = realloc(device_names, sizeof(device_names[0]) * (nfds + 1)); new_device_names = reinterpret_cast<char**>(realloc(device_names, sizeof(device_names[0]) * (nfds + 1))); if(new_device_names == NULL) { fprintf(stderr, "out of memory\n"); return -1; Loading Loading @@ -162,7 +162,7 @@ int init_getevent() const char *device_path = "/dev/input"; nfds = 1; ufds = calloc(1, sizeof(ufds[0])); ufds = reinterpret_cast<pollfd*>(calloc(1, sizeof(ufds[0]))); ufds[0].fd = inotify_init(); ufds[0].events = POLLIN; Loading