add a breakpoint intrinsic for debugging

This can be used to grab the attention of a debugger, and unlike
`abort` execution can be resumed.
This commit is contained in:
Daniel Micay 2013-11-22 10:12:56 -05:00
parent 747213a280
commit bf61641e9f
4 changed files with 12 additions and 1 deletions

View file

@ -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.