about summary refs log tree commit diff
path: root/src/libstd/sys/redox
AgeCommit message (Collapse)AuthorLines
2017-02-27Auto merge of #38165 - Yamakaky:better-backtrace, r=petrochenkovbors-3/+8
Improve backtrace formating while panicking. Fixes #37783. Done: - Fix alignment of file paths for better readability - `RUST_BACKTRACE=full` prints all the informations (current behaviour) - `RUST_BACKTRACE=(short|yes)` is the default and does: - Skip irrelevant frames at the beginning and the end - Remove function address - Remove the current directory from the absolute paths - Remove `::hfabe6541873` at the end of the symbols - `RUST_BACKTRACE=(0|no)` disables the backtrace. - `RUST_BACKTRACE=<everything else>` is equivalent to `short` for backward compatibility. - doc - More uniform printing across platforms. Removed, TODO in a new PR: - Remove path prefix for libraries and libstd Example of short backtrace: ```rust fn fail() { panic!(); } fn main() { let closure = || fail(); closure(); } ``` Short: ``` thread 'main' panicked at 'explicit panic', t.rs:2 Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. stack backtrace: 0: t::fail at ./t.rs:2 1: t::main::{{closure}} at ./t.rs:6 2: t::main at ./t.rs:7 ``` Full: ``` thread 'main' panicked at 'This function never returns!', t.rs:2 stack backtrace: 0: 0x558ddf666478 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::hec84c9dd8389cc5d at /home/yamakaky/dev/rust/rust/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: 0x558ddf65d90e - std::sys_common::backtrace::_print::hfa25f8b31f4b4353 at /home/yamakaky/dev/rust/rust/src/libstd/sys_common/backtrace.rs:71 2: 0x558ddf65cb5e - std::sys_common::backtrace::print::h9b711e11ac3ba805 at /home/yamakaky/dev/rust/rust/src/libstd/sys_common/backtrace.rs:60 3: 0x558ddf66796e - std::panicking::default_hook::{{closure}}::h736d216e74748044 at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:355 4: 0x558ddf66743c - std::panicking::default_hook::h16baff397e46ea10 at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:371 5: 0x558ddf6682bc - std::panicking::rust_panic_with_hook::h6d5a9bb4eca42c80 at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:559 6: 0x558ddf64ea93 - std::panicking::begin_panic::h17dc549df2f10b99 at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:521 7: 0x558ddf64ec42 - t::diverges::he6bc43fc925905f5 at /tmp/p/t.rs:2 8: 0x558ddf64ec5a - t::main::h0ffc20356b8a69c0 at /tmp/p/t.rs:6 9: 0x558ddf6687f5 - core::ops::FnOnce::call_once::hce41f19c0db56f93 10: 0x558ddf667cde - std::panicking::try::do_call::hd4c8c97efb4291df at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:464 11: 0x558ddf698d77 - __rust_try 12: 0x558ddf698c57 - __rust_maybe_catch_panic at /home/yamakaky/dev/rust/rust/src/libpanic_unwind/lib.rs:98 13: 0x558ddf667adb - std::panicking::try::h2c56ed2a59ec1d12 at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:440 14: 0x558ddf66cc9a - std::panic::catch_unwind::h390834e0251cc9af at /home/yamakaky/dev/rust/rust/src/libstd/panic.rs:361 15: 0x558ddf6809ee - std::rt::lang_start::hb73087428e233982 at /home/yamakaky/dev/rust/rust/src/libstd/rt.rs:57 16: 0x558ddf64ec92 - main 17: 0x7fecb869e290 - __libc_start_main 18: 0x558ddf64e8b9 - _start 19: 0x0 - <unknown> ```
2017-02-25Rollup merge of #39961 - redox-os:redox, r=alexcrichtonEduard-Mihai Burtescu-1/+13
Fix compilation on Redox This updates the Redox sys module to fix compilation. The functions peek and peek_from are added to TcpStream and UdpSocket as stubs. The sys::backtrace module is now included correctly
2017-02-15Improve backtrace formating while panicking.Yamakaky-3/+8
- `RUST_BACKTRACE=full` prints all the informations (old behaviour) - `RUST_BACKTRACE=(0|no)` disables the backtrace. - `RUST_BACKTRACE=<everything else>` (including `1`) shows a simplified backtrace, without the function addresses and with cleaned filenames and symbols. Also removes some unneded frames at the beginning and the end. Fixes #37783. PR is #38165.
2017-02-14Conversions between CStr/OsStr/Path and boxes.Clar Charr-0/+16
2017-02-08Fix compilation on RedoxJeremy Soller-1/+13
2017-02-06make Child::try_wait return io::Result<Option<ExitStatus>>Jack O'Connor-4/+4
This is much nicer for callers who want to short-circuit real I/O errors with `?`, because they can write this if let Some(status) = foo.try_wait()? { ... } else { ... } instead of this match foo.try_wait() { Ok(status) => { ... } Err(err) if err.kind() == io::ErrorKind::WouldBlock => { ... } Err(err) => return Err(err), } The original design of `try_wait` was patterned after the `Read` and `Write` traits, which support both blocking and non-blocking implementations in a single API. But since `try_wait` is never blocking, it makes sense to optimize for the non-blocking case. Tracking issue: https://github.com/rust-lang/rust/issues/38903
2017-01-30Add dev and ino to MetadataExtJeremy Soller-0/+10
2017-01-25Rollup merge of #39212 - redox-os:master, r=brsonGuillaume Gomez-1/+8
Use libc errno in Redox submodule This fixes https://github.com/redox-os/redox/issues/830, and is necessary when using libc in Redox
2017-01-22libstd: replace all `try!` with `?` in documentation examplesUtkarsh Kukreti-5/+5
See #38644.
2017-01-20Use libc errnoJeremy Soller-1/+8
2017-01-13Add try_wait to Redox processJeremy Soller-0/+14
2016-12-30Add socket timeout and ttl supportJeremy Soller-26/+128
2016-12-27Fix arguments on RedoxJeremy Soller-9/+5
2016-12-23Cloexec when creating directoriesJeremy Soller-1/+1
2016-12-23Add Debug to OpenOptions and DirBuilderJeremy Soller-1/+2
2016-12-23Auto merge of #38401 - redox-os:redox_cross, r=brsonbors-22/+1317
Redox Cross Compilation I will admit - there are things here that I wish I did not have to do. This completes the ability to create a cross compiler from the rust repository for `x86_64-unknown-redox`. I will document this PR with inline comments explaining some things. [View this gist to see how a cross compiler is built](https://gist.github.com/jackpot51/6680ad973986e84d69c79854249f2b7e) Prior discussion of a smaller change is here: https://github.com/rust-lang/rust/pull/38366
2016-12-22Remove start functions, use newlib instead of openlibm + rallocJeremy Soller-131/+0
2016-12-21Add RawFd traits for netJeremy Soller-15/+64
2016-12-20Fix tidyJeremy Soller-3/+6
2016-12-20Fix building without backtraceJeremy Soller-0/+1
2016-12-20Readd statvfsJeremy Soller-0/+26
2016-12-20Move rt into sys::rt, fix tidyJeremy Soller-334/+137
2016-12-20Add arm syscallsJeremy Soller-2/+78
2016-12-16Address falloutAaron Turon-1/+1
2016-12-15Add start functions, switch allocation crate to rallocJeremy Soller-3/+78
2016-12-15WIP: Cross-compilation for Redox targetJeremy Soller-7/+1400
2016-12-12Fix tidy checksJeremy Soller-1/+2
2016-12-12Fix accidental removal of importJeremy Soller-0/+1
2016-12-12Rollback prefixJeremy Soller-3/+3
2016-11-30Cleanup envJeremy Soller-4/+5
2016-11-28Commit to fix make tidyJeremy Soller-42/+155
2016-11-28Remove file path from std::fs::FileJeremy Soller-4/+2
2016-11-28Move stdout/err flush into sysJeremy Soller-1/+1
2016-11-28Switch to using Prefix::VerbatimJeremy Soller-1/+1
2016-11-28Switch to using syscall crate directly - without importJeremy Soller-188/+171
2016-11-25Fix canonicalizeJeremy Soller-3/+2
2016-11-25Use O_DIRECTORYJeremy Soller-9/+12
2016-11-23Allow setting nonblock on socketsJeremy Soller-11/+16
2016-11-23Add File set_permissionsJeremy Soller-0/+4
2016-11-17Replace setuid, setgid with setreuid, setregidJeremy Soller-2/+2
2016-11-17Add signal support, better exec error handlingJeremy Soller-34/+80
2016-11-15Use chmod instead of fcntl to change file permsJeremy Soller-4/+1
2016-11-15Add set_permJeremy Soller-4/+7
2016-11-14Simple implementation of read2Jeremy Soller-10/+13
2016-11-14Add current_exe supportJeremy Soller-2/+12
2016-11-14Fix redox prefix handlingJeremy Soller-2/+10
2016-11-14Add fcntlJeremy Soller-5/+11
2016-11-10Fix readdirJeremy Soller-7/+11
2016-11-10Fixes for stdio and processes on RedoxJeremy Soller-4/+29
2016-11-09Fix execJeremy Soller-56/+10