emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4ac6148: Avoid printing stacktraces when it probably wouldn't wor


From: Philipp Stephani
Subject: master 4ac6148: Avoid printing stacktraces when it probably wouldn't work anyway.
Date: Sat, 2 Jan 2021 09:26:25 -0500 (EST)

branch: master
commit 4ac6148ef94fed6863c75e73ad91b565ce60cabe
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>

    Avoid printing stacktraces when it probably wouldn't work anyway.
    
    * src/eval.c (signal_or_quit): Don't try to call the debugger if it's
    inhibited or we are about to dump or bootstrap.  In those cases the
    debugger probably wouldn't work anyway.
---
 src/eval.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index d0db902..706aafd 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1731,12 +1731,16 @@ signal_or_quit (Lisp_Object error_symbol, Lisp_Object 
data, bool keyboard_quit)
        return Qnil;
     }
 
-  /* If we're in batch mode, print a backtrace unconditionally to help with
-     debugging.  Make sure to use `debug' unconditionally to not interfere with
-     ERT or other packages that install custom debuggers.  */
+  /* If we're in batch mode, print a backtrace unconditionally to help
+     with debugging.  Make sure to use `debug' unconditionally to not
+     interfere with ERT or other packages that install custom
+     debuggers.  Don't try to call the debugger while dumping or
+     bootstrapping, it wouldn't work anyway.  */
   if (!debugger_called && !NILP (error_symbol)
-      && (NILP (clause) || EQ (h->tag_or_ch, Qerror)) && noninteractive
-      && backtrace_on_error_noninteractive)
+      && (NILP (clause) || EQ (h->tag_or_ch, Qerror))
+      && noninteractive && backtrace_on_error_noninteractive
+      && !will_dump_p () && !will_bootstrap_p ()
+      && NILP (Vinhibit_debugger))
     {
       ptrdiff_t count = SPECPDL_INDEX ();
       specbind (Vdebugger, Qdebug);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]