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
commit52776138a042ac1e64f432582c2dfa2c0865a3bb (patch)
treec89b00b6f75fddf8c9fc01b7f0b6bbead9175f0e /debuggerd/libdebuggerd/utility.cpp
parent569c5ceaa8fc8b9d5dbf2bddcfa698a5387796e8 (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 247d806ba2..3ac98f58f2 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);