Include BuildId in native stack dump.
This is needed to symbolize stack for the ART apex,
since the compile apex path does not have to match
the runtime apex path.
Bug: 171980804
Test: symbolize stack dump from logcat
Change-Id: If778bfe6ea257f51c52aab615f41f28fe92bffd0
diff --git a/runtime/native_stack_dump.cc b/runtime/native_stack_dump.cc
index 6b6663a..f68a229 100644
--- a/runtime/native_stack_dump.cc
+++ b/runtime/native_stack_dump.cc
@@ -402,6 +402,10 @@
os << "???";
}
os << ")";
+ std::string build_id = map->GetBuildId(it->pc);
+ if (!build_id.empty()) {
+ os << " (BuildId: " << build_id << ")";
+ }
}
os << std::endl;
if (try_addr2line && use_addr2line) {