about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-11-22 07:31:35 -0800
committerbors <bors@rust-lang.org>2013-11-22 07:31:35 -0800
commitd3cb24b1fe3fd0e31cccf8ca3c53470f747bae0c (patch)
tree566b929fc15c4b7fd91a490aaf3e24b7289dab52 /src/libstd
parentcad1f89bb5f2b5bdbaa740f7b36d319374fc0b1a (diff)
parentbf61641e9f30927d751d98b52f00a6685c79c347 (diff)
downloadrust-d3cb24b1fe3fd0e31cccf8ca3c53470f747bae0c.tar.gz
rust-d3cb24b1fe3fd0e31cccf8ca3c53470f747bae0c.zip
auto merge of #10610 : thestinger/rust/breakpoint, r=pnkfelix
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.rs4
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.