diff options
| author | Chris Denton <chris@chrisdenton.dev> | 2024-09-25 17:53:57 +0000 |
|---|---|---|
| committer | Chris Denton <chris@chrisdenton.dev> | 2024-09-25 17:53:57 +0000 |
| commit | d3e59a502be4f3cc2d90a252f0604985320599cc (patch) | |
| tree | da4ac6077f2b0dd50180bc6b9655b701604d6eb6 /library/std/src/panicking.rs | |
| parent | b5117538e934f81e39eb9c326fdcc6574d144cb7 (diff) | |
| download | rust-d3e59a502be4f3cc2d90a252f0604985320599cc.tar.gz rust-d3e59a502be4f3cc2d90a252f0604985320599cc.zip | |
Revert Break into the debugger on panic (129019)
Diffstat (limited to 'library/std/src/panicking.rs')
| -rw-r--r-- | library/std/src/panicking.rs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/library/std/src/panicking.rs b/library/std/src/panicking.rs index 336e34d7b95..1c972d38100 100644 --- a/library/std/src/panicking.rs +++ b/library/std/src/panicking.rs @@ -23,8 +23,8 @@ use crate::mem::{self, ManuallyDrop}; use crate::panic::{BacktraceStyle, PanicHookInfo}; use crate::sync::atomic::{AtomicBool, Ordering}; use crate::sync::{PoisonError, RwLock}; +use crate::sys::backtrace; use crate::sys::stdio::panic_output; -use crate::sys::{backtrace, dbg}; use crate::{fmt, intrinsics, process, thread}; // Binary interface to the panic runtime that the standard library depends on. @@ -859,14 +859,6 @@ pub fn rust_panic_without_hook(payload: Box<dyn Any + Send>) -> ! { #[cfg_attr(not(test), rustc_std_internal_symbol)] #[cfg(not(feature = "panic_immediate_abort"))] fn rust_panic(msg: &mut dyn PanicPayload) -> ! { - // Break into the debugger if it is attached. - // The return value is not currently used. - // - // This function isn't used anywhere else, and - // using inside `#[panic_handler]` doesn't seem - // to count, so a warning is issued. - let _ = dbg::breakpoint_if_debugging(); - let code = unsafe { __rust_start_panic(msg) }; rtabort!("failed to initiate panic, error {code}") } @@ -874,14 +866,6 @@ fn rust_panic(msg: &mut dyn PanicPayload) -> ! { #[cfg_attr(not(test), rustc_std_internal_symbol)] #[cfg(feature = "panic_immediate_abort")] fn rust_panic(_: &mut dyn PanicPayload) -> ! { - // Break into the debugger if it is attached. - // The return value is not currently used. - // - // This function isn't used anywhere else, and - // using inside `#[panic_handler]` doesn't seem - // to count, so a warning is issued. - let _ = dbg::breakpoint_if_debugging(); - unsafe { crate::intrinsics::abort(); } |
