GNU bug report logs -
#4228
23.1; --script and stack-trace-on-error
Previous Next
Reported by: Tom Tromey <tromey <at> redhat.com>
Date: Fri, 21 Aug 2009 22:45:05 UTC
Severity: normal
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4228 in the body.
You can then email your comments to 4228 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4228
; Package
emacs
.
(Fri, 21 Aug 2009 22:45:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tom Tromey <tromey <at> redhat.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Fri, 21 Aug 2009 22:45:05 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
I have a script that I run using emacs --script. When writing the
script, I get errors on occasion. It would be very useful if
stack-trace-on-error worked in this situation. Currently it does not.
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.1/etc/DEBUG for instructions.
In GNU Emacs 23.1.1 (i386-redhat-linux-gnu, GTK+ Version 2.16.5)
of 2009-08-03 on x86-5.fedora.phx.redhat.com
Windowing system distributor `The X.Org Foundation', version 11.0.10601901
configured using `configure '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i586-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i586-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i586 -mtune=generic -fasynchronous-unwind-tables''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
erc-list-mode: t
erc-menu-mode: t
erc-autojoin-mode: t
erc-ring-mode: t
erc-pcomplete-mode: t
erc-track-mode: t
erc-track-minor-mode: t
erc-match-mode: t
erc-button-mode: t
erc-fill-mode: t
erc-stamp-mode: t
erc-netsplit-mode: t
erc-spelling-mode: t
erc-truncate-mode: t
diff-auto-refine-mode: t
shell-dirtrack-mode: t
highlight-changes-visible-mode: t
flyspell-mode: t
eldoc-mode: t
erc-status-mode: t
erc-services-mode: t
erc-networks-mode: t
erc-irccontrols-mode: t
erc-noncommands-mode: t
erc-move-to-prompt-mode: t
erc-readonly-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
h e r M-b M-l SPC l i s p SPC v a r s M-b M-b s t a
t i c p r o ' d SPC C-e <return> ( d o l i s t SPC
( v SPC s p e c M-/ ) <return> ( i n M-/ SPC ( c o
n s SPC v SPC v ) ) ) C-f C-f C-o <tab> ; ; SPC n o
n - g c - p r o f <backspace> ' d s <M-backspace> <M-backspace>
<M-backspace> s t a t M-/ C-g i <backspace> p r o s
' <backspace> <backspace> <M-backspace> C-/ ' d SPC
s t u f f C-x C-s C-l C-z o <f10> <f10> <f10> <switch-frame>
<switch-frame> C-z o C-z o <switch-frame> <switch-frame>
C-z o C-a C-v M-v M-v M-v C-v C-v M-< M-> M-< C-z o
<f10> <f10> C-z o C-v C-u C-n C-n C-M-f C-a C-u C-u
C-n C-u C-u C-n C-l M-< C-u C-n C-u C-p C-o C-o ( s
t <backspace> e t q SPC s t a c k - t r ESC TAB SPC
t ) C-x C-s <switch-frame> C-z o C-v M-v C-v C-v C-l
C-u C-p C-p C-e C-u C-p C-p C-p C-d " L I M-/ M-/ M-/
" C-x C-s <switch-frame> <f10> C-c b <help-echo> <switch-frame>
M-< M-x r e p o r t C-g M-f M-f C-h v <return> C-x
1 C-h f b a c k <tab> t r <tab> <tab> <return> C-z
o <f10> <f10> C-z o C-x 1 C-v C-v M-> C-f M-< M-x r
e p o r t - e m <tab> b <tab> <M-backspace> <tab> b
<tab> C-g C-v C-v M-x r e p o r t - e m <tab> b <tab>
<return>
Recent messages:
Wrote /home/tromey/gnu/Emacs/git-emacs/emacs/src/x-defvar.el
Mark set
Quit
Type C-x 1 to delete the help window.
Making completion list... [2 times]
Type C-x 1 to delete the help window.
Mark set
call-interactively: End of buffer
Mark set
Making completion list...
Quit
Tom
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4228
; Package
emacs
.
(Fri, 21 Aug 2009 23:10:06 GMT)
Full text and
rfc822 format available.
Message #8 received at 4228 <at> emacsbugs.donarmstrong.com (full text, mbox):
Tom Tromey <tromey <at> redhat.com> writes:
> I have a script that I run using emacs --script. When writing the
> script, I get errors on occasion. It would be very useful if
> stack-trace-on-error worked in this situation. Currently it does not.
As a workaround you might be able to use `debug-on-error':
emacs --batch --eval '(setq debug-on-error t)' --eval '(this-function-does-not exist)'
Debugger entered--Lisp error: (void-function this-function-does-not)
(this-function-does-not exist)
eval((this-function-does-not exist))
command-line-1(("--eval" "(setq debug-on-error t)" "--eval"
"(this-function-does-not exist)"))
command-line()
normal-top-level()
[No idea why stack-trace-on-error does not work]
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4228
; Package
emacs
.
(Sat, 19 Sep 2009 02:05:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tom Tromey <tromey <at> redhat.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sat, 19 Sep 2009 02:05:05 GMT)
Full text and
rfc822 format available.
Message #13 received at 4228 <at> emacsbugs.donarmstrong.com (full text, mbox):
Dan> [No idea why stack-trace-on-error does not work]
I looked at this a little bit.
eval.c:find_handler_clause prints to a buffer named *Backtrace*. So,
I'm guessing that the stack trace is created -- just not visible.
The appended patch works for me.
Tom
2009-09-19 Tom Tromey <tromey <at> redhat.com>
* eval.c (find_handler_clause): Respect 'noninteractive'.
diff --git a/src/eval.c b/src/eval.c
index 8299474..44f8ec7 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1922,14 +1922,19 @@ find_handler_clause (handlers, conditions, sig, data)
{
max_lisp_eval_depth += 15;
max_specpdl_size++;
+ if (noninteractive)
+ Fbacktrace ();
+ else
+ {
#ifdef PROTOTYPES
- internal_with_output_to_temp_buffer ("*Backtrace*",
- (Lisp_Object (*) (Lisp_Object)) Fbacktrace,
- Qnil);
+ internal_with_output_to_temp_buffer ("*Backtrace*",
+ (Lisp_Object (*) (Lisp_Object)) Fbacktrace,
+ Qnil);
#else
- internal_with_output_to_temp_buffer ("*Backtrace*",
- Fbacktrace, Qnil);
+ internal_with_output_to_temp_buffer ("*Backtrace*",
+ Fbacktrace, Qnil);
#endif
+ }
max_specpdl_size--;
max_lisp_eval_depth -= 15;
}
Reply sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
You have taken responsibility.
(Sun, 20 Sep 2009 17:15:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tom Tromey <tromey <at> redhat.com>
:
bug acknowledged by developer.
(Sun, 20 Sep 2009 17:15:04 GMT)
Full text and
rfc822 format available.
Message #18 received at 4228-done <at> emacsbugs.donarmstrong.com (full text, mbox):
Dan> [No idea why stack-trace-on-error does not work]
> I looked at this a little bit.
> eval.c:find_handler_clause prints to a buffer named *Backtrace*. So,
> I'm guessing that the stack trace is created -- just not visible.
> The appended patch works for me.
Thanks, installed (and removed the non-prototype code since Emacs's
C code now requires prototypes anyway).
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Mon, 19 Oct 2009 14:24:13 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 325 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.