Skip to content

Commit d3e59a5

Browse files
committed
Revert Break into the debugger on panic (129019)
1 parent b511753 commit d3e59a5

3 files changed

Lines changed: 1 addition & 170 deletions

File tree

‎library/std/src/panicking.rs‎

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ use crate::mem::{self, ManuallyDrop};
2323
usecrate::panic::{BacktraceStyle,PanicHookInfo};
2424
usecrate::sync::atomic::{AtomicBool,Ordering};
2525
usecrate::sync::{PoisonError,RwLock};
26+
usecrate::sys::backtrace;
2627
usecrate::sys::stdio::panic_output;
27-
usecrate::sys::{backtrace, dbg};
2828
usecrate::{fmt, intrinsics, process, thread};
2929

3030
// Binary interface to the panic runtime that the standard library depends on.
@@ -859,29 +859,13 @@ pub fn rust_panic_without_hook(payload: Box<dyn Any + Send>) -> ! {
859859
#[cfg_attr(not(test), rustc_std_internal_symbol)]
860860
#[cfg(not(feature = "panic_immediate_abort"))]
861861
fnrust_panic(msg:&mutdynPanicPayload) -> ! {
862-
// Break into the debugger if it is attached.
863-
// The return value is not currently used.
864-
//
865-
// This function isn't used anywhere else, and
866-
// using inside `#[panic_handler]` doesn't seem
867-
// to count, so a warning is issued.
868-
let _ = dbg::breakpoint_if_debugging();
869-
870862
let code = unsafe{__rust_start_panic(msg)};
871863
rtabort!("failed to initiate panic, error {code}")
872864
}
873865

874866
#[cfg_attr(not(test), rustc_std_internal_symbol)]
875867
#[cfg(feature = "panic_immediate_abort")]
876868
fnrust_panic(_:&mutdynPanicPayload) -> ! {
877-
// Break into the debugger if it is attached.
878-
// The return value is not currently used.
879-
//
880-
// This function isn't used anywhere else, and
881-
// using inside `#[panic_handler]` doesn't seem
882-
// to count, so a warning is issued.
883-
let _ = dbg::breakpoint_if_debugging();
884-
885869
unsafe{
886870
crate::intrinsics::abort();
887871
}

‎library/std/src/sys/dbg.rs‎

Lines changed: 0 additions & 152 deletions
This file was deleted.

‎library/std/src/sys/mod.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ mod personality;
1111
pubmod anonymous_pipe;
1212
pubmod backtrace;
1313
pubmod cmath;
14-
pubmod dbg;
1514
pubmod exit_guard;
1615
pubmod os_str;
1716
pubmod path;

0 commit comments

Comments
 (0)