diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/backtrace/Backtrace.h | 13 | ||||
-rw-r--r-- | include/cutils/debugger.h | 4 | ||||
-rw-r--r-- | include/cutils/misc.h | 7 |
3 files changed, 15 insertions, 9 deletions
diff --git a/include/backtrace/Backtrace.h b/include/backtrace/Backtrace.h index bd4134c..3c3a482 100644 --- a/include/backtrace/Backtrace.h +++ b/include/backtrace/Backtrace.h @@ -17,6 +17,7 @@ #ifndef _BACKTRACE_BACKTRACE_H #define _BACKTRACE_BACKTRACE_H +#include <inttypes.h> #include <stdint.h> #include <string> @@ -25,6 +26,14 @@ #include <backtrace/backtrace_constants.h> #include <backtrace/BacktraceMap.h> +#if __LP64__ +#define PRIPTR "016" PRIxPTR +typedef uint64_t word_t; +#else +#define PRIPTR "08" PRIxPTR +typedef uint32_t word_t; +#endif + struct backtrace_frame_data_t { size_t num; // The current fame number. uintptr_t pc; // The absolute pc. @@ -65,7 +74,7 @@ public: virtual const backtrace_map_t* FindMap(uintptr_t pc); // Read the data at a specific address. - virtual bool ReadWord(uintptr_t ptr, uint32_t* out_value) = 0; + virtual bool ReadWord(uintptr_t ptr, word_t* out_value) = 0; // Create a string representing the formatted line of backtrace information // for a single frame. @@ -96,7 +105,7 @@ public: protected: Backtrace(BacktraceImpl* impl, pid_t pid, BacktraceMap* map); - virtual bool VerifyReadWordArgs(uintptr_t ptr, uint32_t* out_value); + virtual bool VerifyReadWordArgs(uintptr_t ptr, word_t* out_value); bool BuildMap(); diff --git a/include/cutils/debugger.h b/include/cutils/debugger.h index 4eda523..af80e2c 100644 --- a/include/cutils/debugger.h +++ b/include/cutils/debugger.h @@ -23,7 +23,11 @@ extern "C" { #endif +#if __LP64__ +#define DEBUGGER_SOCKET_NAME "android:debuggerd64" +#else #define DEBUGGER_SOCKET_NAME "android:debuggerd" +#endif typedef enum { // dump a crash diff --git a/include/cutils/misc.h b/include/cutils/misc.h index 2c48dfa..0de505f 100644 --- a/include/cutils/misc.h +++ b/include/cutils/misc.h @@ -28,13 +28,6 @@ extern "C" { */ extern void *load_file(const char *fn, unsigned *sz); - /* Connects your process to the system debugger daemon - * so that on a crash it may be logged or interactively - * debugged (depending on system settings). - */ -extern void debuggerd_connect(void); - - /* This is the range of UIDs (and GIDs) that are reserved * for assigning to applications. */ |