about summary refs log tree commit diff
path: root/src/libstd/rt/libunwind.rs
AgeCommit message (Collapse)AuthorLines
2015-09-11std: Internalize almost all of `std::rt`Alex Crichton-145/+0
This commit does some refactoring to make almost all of the `std::rt` private. Specifically, the following items are no longer part of its API: * DEFAULT_ERROR_CODE * backtrace * unwind * args * at_exit * cleanup * heap (this is just alloc::heap) * min_stack * util The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is an entry point for the `panic!` macro via the `begin_unwind` and `begin_unwind_fmt` reexports.
2015-08-02Fix compile errors for ARM.Vadim Chugunov-0/+2
2015-07-01Add netbsd amd64 supportAlex Newman-1/+1
2015-04-27std: Prepare for linking to muslAlex Crichton-1/+6
This commit modifies the standard library and its dependencies to link correctly when built against MUSL. This primarily ensures that the right libraries are linked against and when they're linked against they're linked against statically.
2015-04-01Fallout in public-facing and semi-public-facing libsNiko Matsakis-1/+1
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-7/+7
Now that support has been removed, all lingering use cases are renamed.
2015-02-11bitrig integrationDave Huseby-0/+4
2015-02-01openbsd supportSébastien Marie-1/+1
2015-01-11powerpc: Add unwinder size REVISITRicho Healey-0/+3
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-1/+1
2015-01-03Initial version of AArch64 support.Akos Kiss-1/+4
Adds AArch64 knowledge to: * configure, * make files, * sources, * tests, and * documentation.
2015-01-02More falloutNick Cameron-1/+1
2014-12-18libs: merge librustrt into libstdAaron Turon-0/+128
This commit merges the `rustrt` crate into `std`, undoing part of the facade. This merger continues the paring down of the runtime system. Code relying on the public API of `rustrt` will break; some of this API is now available through `std::rt`, but is likely to change and/or be removed very soon. [breaking-change]
2014-06-06std: Extract librustrt out of libstdAlex Crichton-163/+0
As part of the libstd facade efforts, this commit extracts the runtime interface out of the standard library into a standalone crate, librustrt. This crate will provide the following services: * Definition of the rtio interface * Definition of the Runtime interface * Implementation of the Task structure * Implementation of task-local-data * Implementation of task failure via unwinding via libunwind * Implementation of runtime initialization and shutdown * Implementation of thread-local-storage for the local rust Task Notably, this crate avoids the following services: * Thread creation and destruction. The crate does not require the knowledge of an OS threading system, and as a result it seemed best to leave out the `rt::thread` module from librustrt. The librustrt module does depend on mutexes, however. * Implementation of backtraces. There is no inherent requirement for the runtime to be able to generate backtraces. As will be discussed later, this functionality continues to live in libstd rather than librustrt. As usual, a number of architectural changes were required to make this crate possible. Users of "stable" functionality will not be impacted by this change, but users of the `std::rt` module will likely note the changes. A list of architectural changes made is: * The stdout/stderr handles no longer live directly inside of the `Task` structure. This is a consequence of librustrt not knowing about `std::io`. These two handles are now stored inside of task-local-data. The handles were originally stored inside of the `Task` for perf reasons, and TLD is not currently as fast as it could be. For comparison, 100k prints goes from 59ms to 68ms (a 15% slowdown). This appeared to me to be an acceptable perf loss for the successful extraction of a librustrt crate. * The `rtio` module was forced to duplicate more functionality of `std::io`. As the module no longer depends on `std::io`, `rtio` now defines structures such as socket addresses, addrinfo fiddly bits, etc. The primary change made was that `rtio` now defines its own `IoError` type. This type is distinct from `std::io::IoError` in that it does not have an enum for what error occurred, but rather a platform-specific error code. The native and green libraries will be updated in later commits for this change, and the bulk of this effort was put behind updating the two libraries for this change (with `rtio`). * Printing a message on task failure (along with the backtrace) continues to live in libstd, not in librustrt. This is a consequence of the above decision to move the stdout/stderr handles to TLD rather than inside the `Task` itself. The unwinding API now supports registration of global callback functions which will be invoked when a task fails, allowing for libstd to register a function to print a message and a backtrace. The API for registering a callback is experimental and unsafe, as the ramifications of running code on unwinding is pretty hairy. * The `std::unstable::mutex` module has moved to `std::rt::mutex`. * The `std::unstable::sync` module has been moved to `std::rt::exclusive` and the type has been rewritten to not internally have an Arc and to have an RAII guard structure when locking. Old code should stop using `Exclusive` in favor of the primitives in `libsync`, but if necessary, old code should port to `Arc<Exclusive<T>>`. * The local heap has been stripped down to have fewer debugging options. None of these were tested, and none of these have been used in a very long time. [breaking-change]
2014-05-30windows: Allow snake_case errors for now.Kevin Butler-0/+1
2014-03-31std: Switch field privacy as necessaryAlex Crichton-13/+11
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-2/+2
Closes #2569
2014-03-20Register new snapshotsAlex Crichton-8/+2
2014-03-15libstd: Fix a typo. s/target_os/target_arch/Luqman Aden-4/+4
2014-03-14auto merge of #12893 : alexcrichton/rust/cfg-not, r=luqmanabors-2/+13
The two commits have the details of the two fixes
2014-03-14std: Fix backtraces on arm linuxAlex Crichton-2/+13
On android, libgcc is missing the _Unwind_GetIP symbol because it's defined as a macro. This is the same case for arm linux, so this commit adds the necessary cfgs in place to use the "expanded macro" in rust for arm linux.
2014-03-14fix MIPS targetJyun-Yan You-0/+3
I ignored AtomicU64 methods on MIPS target because libgcc doesn't implement MIPS32 64-bit atomic operations. Otherwise it would cause link failure.
2014-03-13Add basic backtrace functionalityAlex Crichton-0/+156
Whenever a failure happens, if a program is run with `RUST_LOG=std::rt::backtrace` a backtrace will be printed to the task's stderr handle. Stack traces are uncondtionally printed on double-failure and rtabort!(). This ended up having a nontrivial implementation, and here's some highlights of it: * We're bundling libbacktrace for everything but OSX and Windows * We use libgcc_s and its libunwind apis to get a backtrace of instruction pointers * On OSX we use dladdr() to go from an instruction pointer to a symbol * On unix that isn't OSX, we use libbacktrace to get symbols * Windows, as usual, has an entirely separate implementation Lots more fun details and comments can be found in the source itself. Closes #10128