diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-11-22 10:12:56 -0500 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-11-22 10:29:04 -0500 |
| commit | bf61641e9f30927d751d98b52f00a6685c79c347 (patch) | |
| tree | 78d6e0ce1f2f971a4539cebc4d868ae680f3b4af /src/libstd | |
| parent | 747213a280ac5505e2537952f1d28efceda0bfcc (diff) | |
| download | rust-bf61641e9f30927d751d98b52f00a6685c79c347.tar.gz rust-bf61641e9f30927d751d98b52f00a6685c79c347.zip | |
add a breakpoint intrinsic for debugging
This can be used to grab the attention of a debugger, and unlike `abort` execution can be resumed.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/unstable/intrinsics.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/unstable/intrinsics.rs b/src/libstd/unstable/intrinsics.rs index f0b94c10fdc..ea3ed10da4e 100644 --- a/src/libstd/unstable/intrinsics.rs +++ b/src/libstd/unstable/intrinsics.rs @@ -176,6 +176,10 @@ extern "rust-intrinsic" { /// Abort the execution of the process. pub fn abort() -> !; + /// Execute a breakpoint trap, for inspection by a debugger. + #[cfg(not(stage0))] + pub fn breakpoint(); + /// Atomic compare and exchange, sequentially consistent. pub fn atomic_cxchg(dst: &mut int, old: int, src: int) -> int; /// Atomic compare and exchange, acquire ordering. |
