summaryrefslogtreecommitdiff
path: root/debuggerd/libdebuggerd/utility.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2018-01-18 11:15:49 -0800
committerChristopher Ferris <cferris@google.com>2018-01-18 17:26:20 -0800
commit7937a36c8e24ef2dc5105a2a6b67f395934b2e2f (patch)
treec41fda20166f7166c5f17dc881da3ec5d8c3b25d /debuggerd/libdebuggerd/utility.cpp
parent2c4f487dfbf1e1cce6e887bfef5e864f8222d07f (diff)
Change all uintptr_t to uint64_t in API.
In order to support the offline unwinding properly, get rid of the usage of non-fixed type uintptr_t from all API calls. In addition, completely remove the old local and remote unwinding code that used libunwind. The next step will be to move the offline unwinding to the new unwinder. Bug: 65682279 Test: Ran unit tests for libbacktrace/debuggerd. Test: Ran debuggerd -b on a few arm and arm64 processes. Test: Ran crasher and crasher64 and verified tombstones look correct. Change-Id: Ib0c6cee3ad6785a102b74908a3d8e5e93e5c6b33
Diffstat (limited to 'debuggerd/libdebuggerd/utility.cpp')
-rw-r--r--debuggerd/libdebuggerd/utility.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/debuggerd/libdebuggerd/utility.cpp b/debuggerd/libdebuggerd/utility.cpp
index 247d806ba..3ac98f58f 100644
--- a/debuggerd/libdebuggerd/utility.cpp
+++ b/debuggerd/libdebuggerd/utility.cpp
@@ -124,7 +124,7 @@ void _LOG(log_t* log, enum logtype ltype, const char* fmt, ...) {
#define MEMORY_BYTES_TO_DUMP 256
#define MEMORY_BYTES_PER_LINE 16
-void dump_memory(log_t* log, unwindstack::Memory* memory, uintptr_t addr, const char* fmt, ...) {
+void dump_memory(log_t* log, unwindstack::Memory* memory, uint64_t addr, const char* fmt, ...) {
std::string log_msg;
va_list ap;
va_start(ap, fmt);
@@ -159,7 +159,7 @@ void dump_memory(log_t* log, unwindstack::Memory* memory, uintptr_t addr, const
bytes &= ~(sizeof(uintptr_t) - 1);
}
- uintptr_t start = 0;
+ uint64_t start = 0;
bool skip_2nd_read = false;
if (bytes == 0) {
// In this case, we might want to try another read at the beginning of
@@ -206,7 +206,7 @@ void dump_memory(log_t* log, unwindstack::Memory* memory, uintptr_t addr, const
std::string ascii;
for (size_t i = 0; i < MEMORY_BYTES_PER_LINE / sizeof(uintptr_t); i++) {
if (current >= start && current + sizeof(uintptr_t) <= total_bytes) {
- android::base::StringAppendF(&logline, " %" PRIPTR, *data_ptr);
+ android::base::StringAppendF(&logline, " %" PRIPTR, static_cast<uint64_t>(*data_ptr));
// Fill out the ascii string from the data.
uint8_t* ptr = reinterpret_cast<uint8_t*>(data_ptr);