From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.user,gmane.lisp.guile.devel Subject: Re: Ditching (debug-enable 'backwards) ? Date: 04 Nov 2002 20:01:43 +0000 Sender: guile-user-admin@gnu.org Message-ID: References: <8765veblg1.fsf@zagadka.ping.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1036441207 23219 80.91.224.249 (4 Nov 2002 20:20:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 4 Nov 2002 20:20:07 +0000 (UTC) Cc: Guile Development , Guile Users Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 188nhY-00061X-00 for ; Mon, 04 Nov 2002 21:20:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 188ngV-0004S9-00; Mon, 04 Nov 2002 15:18:55 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 188nRo-0008Sf-00 for guile-user@gnu.org; Mon, 04 Nov 2002 15:03:44 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 188nRd-0008OP-00 for guile-user@gnu.org; Mon, 04 Nov 2002 15:03:37 -0500 Original-Received: from mail.uklinux.net ([80.84.72.21] helo=s1.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.10) id 188nRc-0008Nk-00; Mon, 04 Nov 2002 15:03:32 -0500 Original-Received: from laruns.ossau.uklinux.net (bts-0827.dialup.zetnet.co.uk [194.247.51.59]) by s1.uklinux.net (8.11.6/8.11.6) with ESMTP id gA4K3SW24066; Mon, 4 Nov 2002 20:03:28 GMT Original-Received: from laruns.ossau.uklinux.net.ossau.uklinux.net (localhost [127.0.0.1]) by laruns.ossau.uklinux.net (Postfix on SuSE Linux 7.2 (i386)) with ESMTP id 59000DC12B; Mon, 4 Nov 2002 20:01:44 +0000 (GMT) Original-To: Marius Vollmer In-Reply-To: <8765veblg1.fsf@zagadka.ping.de> Original-Lines: 68 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:1325 gmane.lisp.guile.devel:1639 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1639 >>>>> "Marius" == Marius Vollmer writes: Marius> Neil Jerram writes: >> Does anyone use (debug-enable 'backwards) and have a good reason for >> keeping it? Marius> Hmm. I'd say we should only remove it when there is significant cost Marius> associated with it. Since we already have it, we might as well keep Marius> it. Maybe it will make someone happy. :-) To be more precise, what I don't like about 'backwards is that it changes how the displayed frames are _numbered_: guile> (let ((x 1) (y "e")) (/ 2 (+ x y))) Backtrace: In unknown file: ?: 0* (let ((x 1) (y "e")) (/ 2 (+ x y))) ?: 1 [/ 2 ... ?: 2* [+ 1 "e"] : In procedure + in expression (+ x y): : Wrong type argument: "e" ABORT: (wrong-type-arg) guile> (debug-enable 'backwards) (show-file-name #t stack 20000 debug backtrace depth 20 maxdepth 1000 frames 3 indent 10 width 79 backwards procnames cheap) guile> (let ((x 1) (y "e")) (/ 2 (+ x y))) Backtrace: In unknown file: ?: 0* [+ 1 "e"] ?: 1 [/ 2 ... ?: 2* (let ((x 1) (y "e")) (/ 2 (+ x y))) : In procedure + in expression (+ x y): : Wrong type argument: "e" ABORT: (wrong-type-arg) I have no objection to frames appearing in reverse order, but I prefer that they were then _numbered_ like this (artist's impression): Backtrace: In unknown file: ?: 2* [+ 1 "e"] ?: 1 [/ 2 ... ?: 0* (let ((x 1) (y "e")) (/ 2 (+ x y))) (As a side point, note that indentation is not as informative when displaying frames backwards.) >> is likely to introduce bugs in the debugger code (if there aren't >> any there already), Marius> Is that so? The 'backwards' option should only matter during display Marius> and we already have that code, right? We do, but as we develop debugging tools further, I'd prefer not to have the call everywhere that converts the frame number as typed by the user to the correct stack index. It's so easy to leave this call out somewhere, and easy not to notice the omission. As a further point, is similarity with GDB worth anything here? GDB numbers frames so that frame 0 is the innermost, so perhaps Guile should do that too. (GDB's direction also has the advantage that "up" for frames coincides with "up" for frame numbers.) Neil _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user