diff options
author | Pavel Chupin <pavel.v.chupin@intel.com> | 2013-11-21 23:17:20 +0400 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-01-30 17:15:24 -0800 |
commit | c6c194ced095df5e777b8fa24527ebd29c8fef54 (patch) | |
tree | e8c2872d11d30743d38f915b90ce394d2773ccf2 /include/backtrace | |
parent | e97dad0d95ae1305686bf4294029da947fc2dcf2 (diff) | |
download | system_core-c6c194ced095df5e777b8fa24527ebd29c8fef54.zip system_core-c6c194ced095df5e777b8fa24527ebd29c8fef54.tar.gz system_core-c6c194ced095df5e777b8fa24527ebd29c8fef54.tar.bz2 |
LP64: Enable debuggerd/libbacktrace/libunwind.
Change-Id: I2e432839f86c33c2adbaac8cc12ca8961956044b
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Diffstat (limited to 'include/backtrace')
-rw-r--r-- | include/backtrace/Backtrace.h | 13 |
1 files changed, 11 insertions, 2 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(); |