summaryrefslogtreecommitdiff
path: root/libunwindstack/Unwinder.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2019-03-11 14:43:33 -0700
committerChristopher Ferris <cferris@google.com>2019-03-13 17:07:46 -0700
commit4a9a3538121c93207bbd022b0f80d9b97738c37c (patch)
treeb4ec5cc93eb91324134bd4ed3471c79e481c98d0 /libunwindstack/Unwinder.cpp
parent3702dac5d06753176f19ca57b6a400df6229efe5 (diff)
downloadunwinding-4a9a3538121c93207bbd022b0f80d9b97738c37c.tar.gz
Add support for displaying soname in an apk.
Changes: - Change GetSoname to always returns a std::string. - Added new unit tests for the soname printing. - Modify the GetElf() function to save the same elf when we see rosegment linkers that split the read-only and read-write across a map. This avoids creating multiple elf objects for each map. - Fixed a few offline unwind tests. Bug: 29218999 Test: Unit tests pass. Change-Id: Iad7c38b5c2957a8c5fd4ba94ebec335bafcad57d
Diffstat (limited to 'libunwindstack/Unwinder.cpp')
-rw-r--r--libunwindstack/Unwinder.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libunwindstack/Unwinder.cpp b/libunwindstack/Unwinder.cpp
index 2734cf8..a1c58dd 100644
--- a/libunwindstack/Unwinder.cpp
+++ b/libunwindstack/Unwinder.cpp
@@ -105,6 +105,12 @@ void Unwinder::FillInFrame(MapInfo* map_info, Elf* elf, uint64_t rel_pc, uint64_
if (resolve_names_) {
frame->map_name = map_info->name;
+ if (embedded_soname_ && map_info->elf_start_offset != 0 && !frame->map_name.empty()) {
+ std::string soname = elf->GetSoname();
+ if (!soname.empty()) {
+ frame->map_name += '!' + soname;
+ }
+ }
}
frame->map_elf_start_offset = map_info->elf_start_offset;
frame->map_exact_offset = map_info->offset;