From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dave Newsgroups: gmane.lisp.guile.user Subject: Re: Enabling Debugging Date: Mon, 31 Jul 2006 10:53:48 +0100 Message-ID: <1154339628.9074.8.camel@localhost.localdomain> References: <20060729113034.GA1340@alamut.tdm.local> <873bck9qkv.fsf@unknownlamer.org> <20060731071301.GA1600@alamut.tdm.local> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1154335999 6869 80.91.229.2 (31 Jul 2006 08:53:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 31 Jul 2006 08:53:19 +0000 (UTC) Cc: Clinton Ebadi , guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Jul 31 10:53:13 2006 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G7TW9-000494-KQ for guile-user@m.gmane.org; Mon, 31 Jul 2006 10:52:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G7TW9-00059U-7Y for guile-user@m.gmane.org; Mon, 31 Jul 2006 04:52:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G7TW2-00059O-Sr for guile-user@gnu.org; Mon, 31 Jul 2006 04:52:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G7TW0-00058s-Mw for guile-user@gnu.org; Mon, 31 Jul 2006 04:52:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G7TW0-00058p-FJ for guile-user@gnu.org; Mon, 31 Jul 2006 04:52:44 -0400 Original-Received: from [208.97.132.118] (helo=randymail-a4.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G7TYd-0004XS-7C for guile-user@gnu.org; Mon, 31 Jul 2006 04:55:27 -0400 Original-Received: from 81-174-209-47.pth-as2.dial.plus.net (81-174-209-47.pth-as2.dial.plus.net [81.174.209.47]) by randymail-a4.dreamhost.com (Postfix) with ESMTP id 1AB8319537C; Mon, 31 Jul 2006 01:52:40 -0700 (PDT) Original-To: Volkan YAZICI In-Reply-To: <20060731071301.GA1600@alamut.tdm.local> X-Mailer: Evolution 2.4.1 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:5435 Archived-At: On Mon, 2006-07-31 at 10:13 +0300, Volkan YAZICI wrote: > On Jul 29 03:08, Clinton Ebadi wrote: > > You should be able to put something like: > > > > SCM_DEVAL_P = 1; > > SCM_RECORD_POSITIONS_P = 1; > > SCM_BACKTRACE_P = 1; > > SCM_RESET_DEBUG_MODE; > > > > Into your real_main (the one passed to scm_boot_guile). This will give > > you debug output similar to the default debugging repl. > > I tried placing above 4 lines just before calling gh_eval_str_with_catch(), > that's in the main_prog() invocated by gh_enter(). But scm_backtrace() > still complains about "No backtrace available". Any other ideas? > > Also, may anybody suggest an example project that uses guile so I can > take a look at its source code for debugging related stuff. Hi Volkan, I had to work through this a while back, and the problem I had was that there are two types of error handler callback - one is called before the stack is unwound, the other after. If you only set the error callback for after the unwind there is no stack to do the debugging... I think you can call gh_eval_str_with_stack_saving_handler() or using the scm interface you can call scm_c_catch() which allows you to specify both handlers. cheers, dave _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user