Remove unused UnwindResult.ip, reuse RunLibUnwindAndSymbolizer

PiperOrigin-RevId: 513482530
Change-Id: I50b24619af77a245088d489052f41f370a4d720b
This commit is contained in:
Wiktor Garbacz 2023-03-02 02:39:33 -08:00 committed by Copybara-Service
parent d74dac096a
commit 0033c4563f
2 changed files with 3 additions and 11 deletions

View File

@ -271,14 +271,8 @@ bool RunLibUnwindAndSymbolizer(Comms* comms) {
EnablePtraceEmulationWithUserRegs(setup.pid(), setup.regs(), mem_fd);
absl::StatusOr<std::vector<uintptr_t>> ips =
RunLibUnwind(setup.pid(), setup.default_max_frames());
absl::StatusOr<std::vector<std::string>> stack_trace;
if (ips.ok()) {
stack_trace = SymbolizeStacktrace(setup.pid(), *ips);
} else {
stack_trace = ips.status();
}
absl::StatusOr<std::vector<std::string>> stack_trace =
RunLibUnwindAndSymbolizer(setup.pid(), setup.default_max_frames());
if (!comms->SendStatus(stack_trace.status())) {
return false;
@ -290,7 +284,6 @@ bool RunLibUnwindAndSymbolizer(Comms* comms) {
UnwindResult msg;
*msg.mutable_stacktrace() = {stack_trace->begin(), stack_trace->end()};
*msg.mutable_ip() = {ips->begin(), ips->end()};
return comms->SendProtoBuf(msg);
}

View File

@ -30,6 +30,5 @@ message UnwindSetup {
message UnwindResult {
// Readable stacktrace, symbolized, one frame per line
repeated string stacktrace = 1;
// Stack frames
repeated uint64 ip = 2;
reserved 2;
}