aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2021-05-13 00:03:26 +0100
committerDavid Srbecky <dsrbecky@google.com>2021-05-13 01:50:00 +0100
commit92b8d64f41da3c76f039d72168c9d27a5081bc06 (patch)
tree74f33c183194b9fe9ba8f8968a3b815cf819dfd4
parent3e0defac5d546c3a0ed0f5faae1a40502ffac003 (diff)
downloadbionic-92b8d64f41da3c76f039d72168c9d27a5081bc06.tar.gz
Update API of MapInfo from libunwindstack
Use accessors to for all the fields. Test: build Change-Id: I6ae458002e059ef2f9d73931cc68f2f698f85d7e
-rw-r--r--libc/malloc_debug/PointerData.cpp4
-rw-r--r--libc/malloc_debug/UnwindBacktrace.cpp10
2 files changed, 7 insertions, 7 deletions
diff --git a/libc/malloc_debug/PointerData.cpp b/libc/malloc_debug/PointerData.cpp
index 4f81ff7ff..90c913638 100644
--- a/libc/malloc_debug/PointerData.cpp
+++ b/libc/malloc_debug/PointerData.cpp
@@ -588,8 +588,8 @@ void PointerData::DumpLiveToFile(int fd) {
dprintf(fd, " bt_info");
for (const auto& frame : *info.backtrace_info) {
dprintf(fd, " {");
- if (frame.map_info != nullptr && !frame.map_info->name.empty()) {
- dprintf(fd, "\"%s\"", frame.map_info->name.c_str());
+ if (frame.map_info != nullptr && !frame.map_info->name().empty()) {
+ dprintf(fd, "\"%s\"", frame.map_info->name().c_str());
} else {
dprintf(fd, "\"\"");
}
diff --git a/libc/malloc_debug/UnwindBacktrace.cpp b/libc/malloc_debug/UnwindBacktrace.cpp
index 92fb3fa96..128991bd9 100644
--- a/libc/malloc_debug/UnwindBacktrace.cpp
+++ b/libc/malloc_debug/UnwindBacktrace.cpp
@@ -90,14 +90,14 @@ void UnwindLog(const std::vector<unwindstack::LocalFrameData>& frame_info) {
unwindstack::MapInfo* map_info = info->map_info;
std::string line = android::base::StringPrintf(" #%0zd pc %" PAD_PTR " ", i, info->rel_pc);
- if (map_info->offset != 0) {
- line += android::base::StringPrintf("(offset 0x%" PRIx64 ") ", map_info->offset);
+ if (map_info->offset() != 0) {
+ line += android::base::StringPrintf("(offset 0x%" PRIx64 ") ", map_info->offset());
}
- if (map_info->name.empty()) {
- line += android::base::StringPrintf("<anonymous:%" PRIx64 ">", map_info->start);
+ if (map_info->name().empty()) {
+ line += android::base::StringPrintf("<anonymous:%" PRIx64 ">", map_info->start());
} else {
- line += map_info->name;
+ line += map_info->name();
}
if (!info->function_name.empty()) {