From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Han-Wen Nienhuys Newsgroups: gmane.lisp.guile.devel Subject: Re: frames / stacks / source? was Re: coverage/profiling Date: Wed, 10 Jan 2007 12:44:21 +0100 Message-ID: <45A4D195.30109@xs4all.nl> References: <45A2D83D.3060700@xs4all.nl> <87wt3vhmon.fsf@ossau.uklinux.net> <45A41BBD.1080906@xs4all.nl> <874pqzgs2a.fsf@laas.fr> Reply-To: hanwen@xs4all.nl NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1168429488 26626 80.91.229.12 (10 Jan 2007 11:44:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Jan 2007 11:44:48 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jan 10 12:44:46 2007 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H4bsr-00033G-L2 for guile-devel@m.gmane.org; Wed, 10 Jan 2007 12:44:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H4bsr-0004Sh-9a for guile-devel@m.gmane.org; Wed, 10 Jan 2007 06:44:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H4bsU-0004H8-6G for guile-devel@gnu.org; Wed, 10 Jan 2007 06:44:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H4bsS-0004Fg-MQ for guile-devel@gnu.org; Wed, 10 Jan 2007 06:44:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H4bsS-0004Fc-Ig for guile-devel@gnu.org; Wed, 10 Jan 2007 06:44:20 -0500 Original-Received: from [194.109.24.36] (helo=smtp-vbr16.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H4bsS-0007ZS-0S for guile-devel@gnu.org; Wed, 10 Jan 2007 06:44:20 -0500 Original-Received: from [192.168.123.187] (muurbloem.xs4all.nl [213.84.26.127]) (authenticated bits=0) by smtp-vbr16.xs4all.nl (8.13.8/8.13.8) with ESMTP id l0ABiIaa091881 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Jan 2007 12:44:18 +0100 (CET) (envelope-from hanwen@xs4all.nl) User-Agent: Thunderbird 1.5.0.9 (X11/20061219) Original-Newsgroups: gmane.lisp.guile.devel Original-To: hanwen@xs4all.nl, Neil Jerram , guile-devel@gnu.org In-Reply-To: <874pqzgs2a.fsf@laas.fr> X-Virus-Scanned: by XS4ALL Virus Scanner X-MIME-Autoconverted: from 8bit to quoted-printable by smtp-vbr16.xs4all.nl id l0ABiIaa091881 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:6414 Archived-At: Ludovic Court=E8s escreveu: > Hi, >=20 > Han-Wen Nienhuys writes: >=20 >> [hanwen@haring info]$ guile >> guile> (trap-enable 'enter-frame-handler) >> throw from within critical section. >> Abortado >=20 > Same here with HEAD and 1.8.0. Here's what happens: >=20 > #0 0x0fc13f6c in raise () from /lib/tls/libc.so.6 > #1 0x0fc15a0c in abort () from /lib/tls/libc.so.6 > #2 0x0ffa4a1c in scm_ithrow (key=3D0x10015410, args=3D0x300a2558, no= return=3D) at throw.c:699 > #3 0x0ff3718c in scm_error_scm (key=3D0x10015410, subr=3D0x300781f0,= message=3D0x300781d0, args=3D0x300a2578, data=3D0x4) at error.c:92 > #4 0x0ff37220 in scm_error (key=3D0x10015410, subr=3D, message=3D0xffc5594 "Unknown option name: ~S", args=3D0x300a2578,= =20 > rest=3D0x4) at error.c:58 > #5 0x0ff37268 in scm_misc_error (subr=3D0xfa
, message=3D0x3001bb60 "", args=3D0x0) at error.c:268 > #6 0x0ff721a8 in scm_options (args=3D0x300a25e8, options=3D0xffe1b40= , n=3D7, s=3D0xffc117c "evaluator-traps-interface") at options.c:202 > #7 0x0ff3a1e4 in scm_evaluator_traps (setting=3D0x300a25c8) at eval.= c:3134 > #8 0x0ff3ec50 in deval (x=3D, env=3D0x300a2668)= at eval.c:4219 >=20 > (Note the "Unknown option name"...) I have added=20 /* the jump buffer data structure */ @@ -695,7 +696,24 @@ scm_ithrow (SCM key, SCM args, int noret =20 if (scm_i_critical_section_level) { + SCM s =3D args; + int i =3D 0; + + /* + We have much better routines for displaying Scheme, but we're + already inside a pernicious error, and it's unlikely that they + are available to us. We try to print something useful anyway, + so users don't need a debugger to find out what went wrong. + */ fprintf (stderr, "throw from within critical section.\n"); + if (scm_is_symbol (key)) + fprintf (stderr, "error key: %s\n", scm_i_symbol_chars (key)); + + =20 + for (; scm_is_pair (s); s =3D scm_cdr (s), i++) + if (scm_is_string (scm_car (s))) + fprintf (stderr, "argument %d: %s\n", i, scm_i_string_chars (sc= m_car (s))); + =20 abort (); } =20 I wonder, is there any generic routine for safely printing immediates=20 and strings/symbols? This might also be a good idea to apply to 1.8. With lilypond, we occasionally have this problem as well, and it's a PITA to have to use a debugger to find out about a user-level fault. =20 --=20 Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel