sandboxed-api/sandboxed_api
Christian Blichmann eb62bae167 Refactor stack trace handling
- Drop `delim` argument from the `GetStackTrace()` family of functions.
  We only ever used plain spaces.
- Use an `std::vector<std::string>` for the symbolized stack frames and
  adjust the unwind proto accordingly.

This change now prints each stack frame on its own line while skipping
duplicate ones:

```
I20200717 11:47:16.811381 3636246 monitor.cc:326] Stack trace: [
I20200717 11:47:16.811415 3636246 monitor.cc:337]   map:/lib/x86_64-linux-gnu/libc-2.30.so+0xceee7(0x7fb871602ee7)
I20200717 11:47:16.811420 3636246 monitor.cc:337]   Rot13File+0x130(0x55ed24615995)
I20200717 11:47:16.811424 3636246 monitor.cc:337]   ffi_call_unix64+0x55(0x55ed2461f2dd)
I20200717 11:47:16.811429 3636246 monitor.cc:337]   map:[stack]+0x1ec80(0x7ffee4257c80)
I20200717 11:47:16.811455 3636246 monitor.cc:339]   (last frame repeated 196 times)
I20200717 11:47:16.811460 3636246 monitor.cc:347] ]
```

PiperOrigin-RevId: 322089140
Change-Id: I05b0de2f4118fed90fe920c06bbd70ea0d1119e2
2020-07-20 00:24:40 -07:00
..
bazel Fix ptrace_hook dependency graph 2020-07-17 03:20:43 -07:00
docs Internal change. 2020-03-19 09:58:28 -07:00
examples Fix mix-up in main_zlib.cc 2020-07-13 06:12:35 -07:00
sandbox2 Refactor stack trace handling 2020-07-20 00:24:40 -07:00
tools Workaround for issue#32 2020-07-14 07:28:16 -07:00
util Update StatusOr<> and tests 2020-04-28 06:12:58 -07:00
BUILD.bazel Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
call.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
client.cc Cleanup calls to sapi::StatusOr<>::ValueOrDie() 2020-04-02 07:42:45 -07:00
CMakeLists.txt Move filewrapper to tools directory 2020-05-29 05:40:52 -07:00
embed_file.cc Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
embed_file.h Replace deprecated thread annotations macros. 2020-01-30 05:06:55 -08:00
file_toc.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
lenval_core.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
proto_arg.proto Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
proto_helper.h Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
rpcchannel.cc Cleanup calls to sapi::StatusOr<>::ValueOrDie() 2020-04-02 07:42:45 -07:00
rpcchannel.h Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
sandbox.cc Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
sandbox.h Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
sapi_test.cc Cleanup calls to sapi::StatusOr<>::ValueOrDie() 2020-04-02 07:42:45 -07:00
transaction.cc Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
transaction.h Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
var_abstract.cc Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
var_abstract.h Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
var_array.h Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
var_int.cc Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
var_int.h Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
var_lenval.cc Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
var_lenval.h Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
var_pointable.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
var_pointable.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
var_proto.h Cleanup calls to sapi::StatusOr<>::ValueOrDie() 2020-04-02 07:42:45 -07:00
var_ptr.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
var_reg.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
var_struct.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
var_type.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
var_void.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
vars.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00