summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_report.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-03-30 16:21:47 -0700
committerYabin Cui <yabinc@google.com>2016-03-30 16:21:47 -0700
commit257d5e69967941de7c5516a476397450063b8c3d (patch)
tree5729b8ffc4e002d9a75d5e56c49495dd0fd814b9 /simpleperf/cmd_report.cpp
parent6dd31f4a3fda4dc6a49bcda1fb67052bc478c3fb (diff)
downloadextras-257d5e69967941de7c5516a476397450063b8c3d.tar.gz
simpleperf: don't allow 64bit simpleperf unwinding 32bit processes.
Bug: 27927427 Change-Id: I87abc7f8d1f160da4366ed04db054206403bc803
Diffstat (limited to 'simpleperf/cmd_report.cpp')
-rw-r--r--simpleperf/cmd_report.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/simpleperf/cmd_report.cpp b/simpleperf/cmd_report.cpp
index 9f3e7362..d42bf694 100644
--- a/simpleperf/cmd_report.cpp
+++ b/simpleperf/cmd_report.cpp
@@ -568,8 +568,9 @@ void ReportCommand::ProcessSampleRecord(const SampleRecord& r) {
RegSet regs = CreateRegSet(r.regs_user_data.reg_mask, r.regs_user_data.regs);
std::vector<char> stack(r.stack_user_data.data.begin(),
r.stack_user_data.data.begin() + r.stack_user_data.data.size());
+ ArchType arch = GetArchForAbi(ScopedCurrentArch::GetCurrentArch(), r.regs_user_data.abi);
std::vector<uint64_t> unwind_ips =
- UnwindCallChain(ScopedCurrentArch::GetCurrentArch(), *sample->thread, regs, stack);
+ UnwindCallChain(arch, *sample->thread, regs, stack);
if (!unwind_ips.empty()) {
ips.push_back(PERF_CONTEXT_USER);
ips.insert(ips.end(), unwind_ips.begin(), unwind_ips.end());