diff options
author | Christopher Ferris <cferris@google.com> | 2018-01-19 23:30:33 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-01-19 23:30:33 +0000 |
commit | e20b4a48fee974901e73039f6add426df857e3de (patch) | |
tree | 8818fbffe638b0523535829829e047a6ca0ec82b /libbacktrace/include/backtrace/Backtrace.h | |
parent | b6d7f2655d19f8de30b3957a12715afddf7fc522 (diff) | |
parent | 7937a36c8e24ef2dc5105a2a6b67f395934b2e2f (diff) | |
download | system_core-e20b4a48fee974901e73039f6add426df857e3de.tar.gz system_core-e20b4a48fee974901e73039f6add426df857e3de.tar.bz2 system_core-e20b4a48fee974901e73039f6add426df857e3de.zip |
Merge "Change all uintptr_t to uint64_t in API."
Diffstat (limited to 'libbacktrace/include/backtrace/Backtrace.h')
-rw-r--r-- | libbacktrace/include/backtrace/Backtrace.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/libbacktrace/include/backtrace/Backtrace.h b/libbacktrace/include/backtrace/Backtrace.h index f34fb2d5f..1b8ad19e3 100644 --- a/libbacktrace/include/backtrace/Backtrace.h +++ b/libbacktrace/include/backtrace/Backtrace.h @@ -26,11 +26,11 @@ #include <backtrace/backtrace_constants.h> #include <backtrace/BacktraceMap.h> -#if __LP64__ -#define PRIPTR "016" PRIxPTR +#if defined(__LP64__) +#define PRIPTR "016" PRIx64 typedef uint64_t word_t; #else -#define PRIPTR "08" PRIxPTR +#define PRIPTR "08" PRIx64 typedef uint32_t word_t; #endif @@ -77,14 +77,15 @@ struct BacktraceUnwindError { struct backtrace_frame_data_t { size_t num; // The current fame number. - uintptr_t pc; // The absolute pc. - uintptr_t rel_pc; // The relative pc. - uintptr_t sp; // The top of the stack. + uint64_t pc; // The absolute pc. + uint64_t rel_pc; // The relative pc. + uint64_t sp; // The top of the stack. size_t stack_size; // The size of the stack, zero indicate an unknown stack size. uint64_t dex_pc; // If non-zero, the Dex PC for the ART interpreter. backtrace_map_t map; // The map associated with the given pc. std::string func_name; // The function name associated with this pc, NULL if not found. - uintptr_t func_offset; // pc relative to the start of the function, only valid if func_name is not NULL. + uint64_t func_offset; // pc relative to the start of the function, only valid if func_name is not + // NULL. }; #if defined(__APPLE__) @@ -139,20 +140,20 @@ public: // Get the function name and offset into the function given the pc. // If the string is empty, then no valid function name was found, // or the pc is not in any valid map. - virtual std::string GetFunctionName(uintptr_t pc, uintptr_t* offset, + virtual std::string GetFunctionName(uint64_t pc, uint64_t* offset, const backtrace_map_t* map = NULL); // Fill in the map data associated with the given pc. - virtual void FillInMap(uintptr_t pc, backtrace_map_t* map); + virtual void FillInMap(uint64_t pc, backtrace_map_t* map); // Read the data at a specific address. - virtual bool ReadWord(uintptr_t ptr, word_t* out_value) = 0; + virtual bool ReadWord(uint64_t ptr, word_t* out_value) = 0; // Read arbitrary data from a specific address. If a read request would // span from one map to another, this call only reads up until the end // of the current map. // Returns the total number of bytes actually read. - virtual size_t Read(uintptr_t addr, uint8_t* buffer, size_t bytes) = 0; + virtual size_t Read(uint64_t addr, uint8_t* buffer, size_t bytes) = 0; // Create a string representing the formatted line of backtrace information // for a single frame. @@ -189,9 +190,9 @@ protected: // The name returned is not demangled, GetFunctionName() takes care of // demangling the name. - virtual std::string GetFunctionNameRaw(uintptr_t pc, uintptr_t* offset) = 0; + virtual std::string GetFunctionNameRaw(uint64_t pc, uint64_t* offset) = 0; - virtual bool VerifyReadWordArgs(uintptr_t ptr, word_t* out_value); + virtual bool VerifyReadWordArgs(uint64_t ptr, word_t* out_value); bool BuildMap(); |