about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-01-12 10:55:07 +0100
committerGitHub <noreply@github.com>2019-01-12 10:55:07 +0100
commit85a7fc8c48f4355e2b9f86dff09e743ab5fbf92f (patch)
treec3e43edec8783c0b78a02dee094ddd010732b07e /src/rustllvm/RustWrapper.cpp
parent632d8909a0dbf1c8f2569987b24d36dc013ed5e8 (diff)
parent2e4766c3afcdac9f45edbd73723384b360ee4b68 (diff)
downloadrust-85a7fc8c48f4355e2b9f86dff09e743ab5fbf92f.tar.gz
rust-85a7fc8c48f4355e2b9f86dff09e743ab5fbf92f.zip
Rollup merge of #57441 - VardhanThigle:Vardhan/x86_64-fortanix-unknown-sgx-backtrace-support, r=alexcrichton
Supporting backtrace for x86_64-fortanix-unknown-sgx.

# Overview
Implementing following functions required by `libstd/sys_common` to support `backtrace`:
```
1. unwind_backtrace
2. trace_fn
3. resolve_symname
```
# Description:
The changes here are quite similar to the Cloudabi target `src/libstd/sys/cloudabi/backtrace.rs`
The first 2 functions are implemented via calls to libunwind.a that is linked to the `x86_64-fortanix-unknown-sgx` (#56979),  we have not implemented functionality needed by `resolve_symname`  (or `dladdr`) to reduce SGX TCB. Rather, we print the function address (relative to enclave image base) in `resolve_symname` which can be later translated to correct symbol name (say, via `addr2line`).

# Note:
For `x86_64-fortanix-unknown-sgx`, the `RUST_BACKTRACE` environment has to be set from within the program running in an enclave.
cc: @jethrogb
r? @alexcrichton
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions