From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: William Morgan Newsgroups: gmane.lisp.guile.devel Subject: Re: wrong-type-arg in scm_display_backtrace Date: Wed, 8 Jan 2003 17:38:47 -0500 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <20030108223847.GA6983@masanjin.net> References: <20021230013149.GB25056@masanjin.net> <20030105035742.GA29985@masanjin.net> <20030107054232.GA10760@masanjin.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1042073105 21927 80.91.224.249 (9 Jan 2003 00:45:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 9 Jan 2003 00:45:05 +0000 (UTC) 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 18WQoh-0005hU-00 for ; Thu, 09 Jan 2003 01:45:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18WQo0-0005GV-03 for guile-devel@m.gmane.org; Wed, 08 Jan 2003 19:44:20 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18WPwy-0008R8-00 for guile-devel@gnu.org; Wed, 08 Jan 2003 18:49:32 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18WPuu-0007sX-00 for guile-devel@gnu.org; Wed, 08 Jan 2003 18:47:26 -0500 Original-Received: from h0060976e2b56.ne.client2.attbi.com ([65.96.180.211] helo=lux) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18WOnl-00087V-00 for guile-devel@gnu.org; Wed, 08 Jan 2003 17:35:57 -0500 Original-Received: from wmorgan by lux with local (Exim 3.35 #1 (Debian)) id 18WOqV-0001qB-00 for ; Wed, 08 Jan 2003 17:38:47 -0500 Original-To: guile-devel@gnu.org Mail-Followup-To: guile-devel@gnu.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:1862 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1862 Excerpts (reformatted) from Neil Jerram's mail of 8 Jan 2003 (EST): > Are you running with the debugging evaluator? Ah hah! This was the key. In my invocation of scm_init_guile(), I write: scm_init_guile(); SCM_DEVAL_P = 1; SCM_BACKTRACE_P = 1; SCM_RECORD_POSITIONS_P = 1; SCM_RESET_DEBUG_MODE; and now I have backtraces. Yes!!! Now, I just have to figure out how to use vports to steal the backtrace dump and put it somewhere intelligent... Having finally succeeded, I have a couple comments: 1) The commands above are wicked voodoo that should be encapsulated in some kind of scm_enable_debugging() library call. There's no way I, as the application developer, should be playing with these variables directly. 2) This whole process has been unnecessarily difficult, considering that I am doing *only* and *exactly* what anyone who wants to embed Guile in their program must do (run Guile callbacks, catch errors, display errors nicely). Issue #2, at least, is mostly a matter of lack of documentation. I promise to write up a "how to embed Guile in your C program" document and post it here. Thank you, Neil, for all of your help. -- William _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel