From tromey@redhat.com Fri Aug 21 15:38:34 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 21 Aug 2009 22:38:34 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.7 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7LMcXKJ008221 for ; Fri, 21 Aug 2009 15:38:34 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mecki-0005HW-Pi for bug-gnu-emacs@gnu.org; Fri, 21 Aug 2009 18:38:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Meckd-0005GZ-9c for bug-gnu-emacs@gnu.org; Fri, 21 Aug 2009 18:38:32 -0400 Received: from [199.232.76.173] (port=35469 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Meckd-0005GW-1Q for bug-gnu-emacs@gnu.org; Fri, 21 Aug 2009 18:38:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16842) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Meckc-0006kW-EH for bug-gnu-emacs@gnu.org; Fri, 21 Aug 2009 18:38:26 -0400 Received: from int-mx07.intmail.prod.int.phx2.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7LMcNF2018615 for ; Fri, 21 Aug 2009 18:38:23 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx07.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7LMcMuL024522; Fri, 21 Aug 2009 18:38:23 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7LMcLR8010614; Fri, 21 Aug 2009 18:38:22 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 1EC503782EF; Fri, 21 Aug 2009 16:38:21 -0600 (MDT) From: Tom Tromey To: bug-gnu-emacs@gnu.org Subject: 23.1; --script and stack-trace-on-error Reply-To: Tom Tromey X-Attribution: Tom Date: Fri, 21 Aug 2009 16:38:21 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanned-By: MIMEDefang 2.67 on 10.5.11.20 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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@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 ( d o l i s t SPC ( v SPC s p e c M-/ ) ( i n M-/ SPC ( c o n s SPC v SPC v ) ) ) C-f C-f C-o ; ; SPC n o n - g c - p r o f ' d s s t a t M-/ C-g i p r o s ' C-/ ' d SPC s t u f f C-x C-s C-l C-z o C-z o C-z o C-z o C-a C-v M-v M-v M-v C-v C-v M-< M-> M-< C-z o 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 e t q SPC s t a c k - t r ESC TAB SPC t ) C-x C-s 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 C-c b M-< M-x r e p o r t C-g M-f M-f C-h v C-x 1 C-h f b a c k t r C-z o C-z o C-x 1 C-v C-v M-> C-f M-< M-x r e p o r t - e m b b C-g C-v C-v M-x r e p o r t - e m b 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 From dann@godzilla.ics.uci.edu Fri Aug 21 16:05:24 2009 Received: (at 4228) by emacsbugs.donarmstrong.com; 21 Aug 2009 23:05:25 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-6.8 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7LN5Nhc013285 for <4228@emacsbugs.donarmstrong.com>; Fri, 21 Aug 2009 16:05:24 -0700 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n7LN5B2U007617; Fri, 21 Aug 2009 16:05:11 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n7LN5BJ7023849; Fri, 21 Aug 2009 16:05:11 -0700 (PDT) Date: Fri, 21 Aug 2009 16:05:11 -0700 (PDT) Message-Id: <200908212305.n7LN5BJ7023849@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Tom Tromey Cc: 4228@debbugs.gnu.org Subject: Re: bug#4228: 23.1; --script and stack-trace-on-error References: X-Debbugs-No-Ack: yes In-Reply-To: (Tom Tromey's message of "Fri, 21 Aug 2009 16:38:21 -0600") Lines: 18 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n7LN5B2U007617 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu Tom Tromey 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] From tromey@redhat.com Fri Sep 18 18:57:55 2009 Received: (at 4228) by emacsbugs.donarmstrong.com; 19 Sep 2009 01:57:55 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, IMPRONONCABLE_2,MURPHY_DRUGS_REL8,SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8J1vs4k018618 for <4228@emacsbugs.donarmstrong.com>; Fri, 18 Sep 2009 18:57:55 -0700 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8J1vlFi014914; Fri, 18 Sep 2009 21:57:47 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8J1vkQ1029607; Fri, 18 Sep 2009 21:57:46 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n8J1vjtX015757; Fri, 18 Sep 2009 21:57:45 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id EFF143782A5; Fri, 18 Sep 2009 19:57:44 -0600 (MDT) From: Tom Tromey To: Dan Nicolaescu Cc: 4228@debbugs.gnu.org Subject: Re: bug#4228: 23.1; --script and stack-trace-on-error References: <200908212305.n7LN5BJ7023849@godzilla.ics.uci.edu> Reply-To: Tom Tromey X-Attribution: Tom Date: Fri, 18 Sep 2009 19:57:44 -0600 In-Reply-To: <200908212305.n7LN5BJ7023849@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Fri, 21 Aug 2009 16:05:11 -0700 (PDT)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 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 * 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; } From monnier@iro.umontreal.ca Sun Sep 20 10:06:00 2009 Received: (at 4228-done) by emacsbugs.donarmstrong.com; 20 Sep 2009 17:06:00 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.7 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.183]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8KH5xVD008211 for <4228-done@emacsbugs.donarmstrong.com>; Sun, 20 Sep 2009 10:06:00 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEAF/9tUpFxL35/2dsb2JhbACBUstNhBsFh34 X-IronPort-AV: E=Sophos;i="4.44,419,1249272000"; d="scan'208";a="46165593" Received: from 69-196-189-249.dsl.teksavvy.com (HELO pastel.home) ([69.196.189.249]) by ironport2-out.pppoe.ca with ESMTP; 20 Sep 2009 13:05:53 -0400 Received: by pastel.home (Postfix, from userid 20848) id 05A088079; Sun, 20 Sep 2009 13:05:51 -0400 (EDT) From: Stefan Monnier To: Tom Tromey Cc: Dan Nicolaescu Subject: Re: bug#4228: 23.1; --script and stack-trace-on-error Message-ID: References: <200908212305.n7LN5BJ7023849@godzilla.ics.uci.edu> Date: Sun, 20 Sep 2009 13:05:51 -0400 In-Reply-To: (Tom Tromey's message of "Fri, 18 Sep 2009 19:57:44 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 From unknown Sat Sep 06 02:32:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 19 Oct 2009 14:24:13 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator