-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #133726 - joshtriplett:breakpoint, r=oli-obk
Add `core::arch::breakpoint` and test Approved in [ACP 491](rust-lang/libs-team#491).
- Loading branch information
Showing
9 changed files
with
66 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
#![feature(core_intrinsics)] | ||
|
||
fn main() { | ||
unsafe { | ||
core::intrinsics::breakpoint() //~ ERROR: trace/breakpoint trap | ||
}; | ||
core::intrinsics::breakpoint(); //~ ERROR: trace/breakpoint trap | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//@ revisions: aarch64 x86_64 | ||
//@ assembly-output: emit-asm | ||
//@[aarch64] only-aarch64 | ||
//@[x86_64] only-x86_64 | ||
|
||
#![feature(breakpoint)] | ||
#![crate_type = "lib"] | ||
|
||
// CHECK-LABEL: use_bp | ||
// aarch64: brk #0xf000 | ||
// x86_64: int3 | ||
pub fn use_bp() { | ||
core::arch::breakpoint(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#![feature(intrinsics)] | ||
extern "rust-intrinsic" { | ||
pub static breakpoint : unsafe extern "rust-intrinsic" fn(); | ||
pub static atomic_singlethreadfence_seqcst : unsafe extern "rust-intrinsic" fn(); | ||
//~^ ERROR intrinsic must be a function [E0622] | ||
} | ||
fn main() { unsafe { breakpoint(); } } | ||
fn main() { unsafe { atomic_singlethreadfence_seqcst(); } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters