mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Remove unused UnwindResult.ip, reuse RunLibUnwindAndSymbolizer
PiperOrigin-RevId: 513482530 Change-Id: I50b24619af77a245088d489052f41f370a4d720b
This commit is contained in:
parent
d74dac096a
commit
0033c4563f
|
@ -271,14 +271,8 @@ bool RunLibUnwindAndSymbolizer(Comms* comms) {
|
||||||
|
|
||||||
EnablePtraceEmulationWithUserRegs(setup.pid(), setup.regs(), mem_fd);
|
EnablePtraceEmulationWithUserRegs(setup.pid(), setup.regs(), mem_fd);
|
||||||
|
|
||||||
absl::StatusOr<std::vector<uintptr_t>> ips =
|
absl::StatusOr<std::vector<std::string>> stack_trace =
|
||||||
RunLibUnwind(setup.pid(), setup.default_max_frames());
|
RunLibUnwindAndSymbolizer(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();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!comms->SendStatus(stack_trace.status())) {
|
if (!comms->SendStatus(stack_trace.status())) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -290,7 +284,6 @@ bool RunLibUnwindAndSymbolizer(Comms* comms) {
|
||||||
|
|
||||||
UnwindResult msg;
|
UnwindResult msg;
|
||||||
*msg.mutable_stacktrace() = {stack_trace->begin(), stack_trace->end()};
|
*msg.mutable_stacktrace() = {stack_trace->begin(), stack_trace->end()};
|
||||||
*msg.mutable_ip() = {ips->begin(), ips->end()};
|
|
||||||
return comms->SendProtoBuf(msg);
|
return comms->SendProtoBuf(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,5 @@ message UnwindSetup {
|
||||||
message UnwindResult {
|
message UnwindResult {
|
||||||
// Readable stacktrace, symbolized, one frame per line
|
// Readable stacktrace, symbolized, one frame per line
|
||||||
repeated string stacktrace = 1;
|
repeated string stacktrace = 1;
|
||||||
// Stack frames
|
reserved 2;
|
||||||
repeated uint64 ip = 2;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user