summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'libbacktrace/Backtrace.cpp')
-rw-r--r--libbacktrace/Backtrace.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/libbacktrace/Backtrace.cpp b/libbacktrace/Backtrace.cpp
index e46d35389..81f5e32cc 100644
--- a/libbacktrace/Backtrace.cpp
+++ b/libbacktrace/Backtrace.cpp
@@ -84,10 +84,8 @@ std::string Backtrace::FormatFrameData(size_t frame_num) {
84} 84}
85 85
86std::string Backtrace::FormatFrameData(const backtrace_frame_data_t* frame) { 86std::string Backtrace::FormatFrameData(const backtrace_frame_data_t* frame) {
87 uintptr_t relative_pc;
88 std::string map_name; 87 std::string map_name;
89 if (BacktraceMap::IsValid(frame->map)) { 88 if (BacktraceMap::IsValid(frame->map)) {
90 relative_pc = BacktraceMap::GetRelativePc(frame->map, frame->pc);
91 if (!frame->map.name.empty()) { 89 if (!frame->map.name.empty()) {
92 map_name = frame->map.name.c_str(); 90 map_name = frame->map.name.c_str();
93 if (map_name[0] == '[' && map_name[map_name.size() - 1] == ']') { 91 if (map_name[0] == '[' && map_name[map_name.size() - 1] == ']') {
@@ -99,10 +97,9 @@ std::string Backtrace::FormatFrameData(const backtrace_frame_data_t* frame) {
99 } 97 }
100 } else { 98 } else {
101 map_name = "<unknown>"; 99 map_name = "<unknown>";
102 relative_pc = frame->pc;
103 } 100 }
104 101
105 std::string line(StringPrintf("#%02zu pc %" PRIPTR " ", frame->num, relative_pc)); 102 std::string line(StringPrintf("#%02zu pc %" PRIPTR " ", frame->num, frame->rel_pc));
106 line += map_name; 103 line += map_name;
107 // Special handling for non-zero offset maps, we need to print that 104 // Special handling for non-zero offset maps, we need to print that
108 // information. 105 // information.