diff options
| author | Segev Finer <segev208@gmail.com> | 2017-01-22 00:28:17 +0200 |
|---|---|---|
| committer | Segev Finer <segev208@gmail.com> | 2017-01-24 23:10:00 +0200 |
| commit | 4186037aaa1a6aa3ba15a10130b424e7508bd276 (patch) | |
| tree | ebd6d096512c8bf550f774dcf89dce910f9dccb3 /src/libstd/sys/unix/backtrace/mod.rs | |
| parent | fe597dc9a9f325de9b2b11d69e190e1c22c4e7dc (diff) | |
| download | rust-4186037aaa1a6aa3ba15a10130b424e7508bd276.tar.gz rust-4186037aaa1a6aa3ba15a10130b424e7508bd276.zip | |
Make backtraces work on Windows GNU targets again.
This is done by adding a function that can return a filename to pass to backtrace_create_state. The filename is obtained in a safe way by first getting the filename, locking the file so it can't be moved, and then getting the filename again and making sure it's the same. See: https://github.com/rust-lang/rust/pull/37359#issuecomment-260123399 Issue: #33985
Diffstat (limited to 'src/libstd/sys/unix/backtrace/mod.rs')
| -rw-r--r-- | src/libstd/sys/unix/backtrace/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/sys/unix/backtrace/mod.rs b/src/libstd/sys/unix/backtrace/mod.rs index d7c05e513f6..e3f1b23f7a2 100644 --- a/src/libstd/sys/unix/backtrace/mod.rs +++ b/src/libstd/sys/unix/backtrace/mod.rs @@ -83,9 +83,16 @@ /// to symbols. This is a bit of a hokey implementation as-is, but it works for /// all unix platforms we support right now, so it at least gets the job done. +use io; +use fs; + pub use self::tracing::write; // tracing impls: mod tracing; // symbol resolvers: mod printing; + +pub fn get_executable_filename() -> io::Result<(Vec<i8>, fs::File)> { + Err(io::Error::new(io::ErrorKind::Other, "Not implemented")) +} |
