From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: Stack traces Date: Sat, 18 Feb 2017 08:58:58 -0800 Message-ID: <34F40DF4-899A-4400-A2F6-820EFB3C66FD@gmail.com> References: <87h93wto3y.fsf_-_@gnu.org> <87mvdn4gam.fsf@dustycloud.org> <641f554a-3672-d71a-78cd-f32f5287f98d@hypermove.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1487437172 17471 195.159.176.226 (18 Feb 2017 16:59:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 18 Feb 2017 16:59:32 +0000 (UTC) Cc: guile-user@gnu.org To: Amirouche Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Feb 18 17:59:28 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cf8M0-0003xf-OV for guile-user@m.gmane.org; Sat, 18 Feb 2017 17:59:24 +0100 Original-Received: from localhost ([::1]:59112 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cf8M6-0006G4-EM for guile-user@m.gmane.org; Sat, 18 Feb 2017 11:59:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cf8Lj-0006Fz-S2 for guile-user@gnu.org; Sat, 18 Feb 2017 11:59:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cf8Lf-0002K7-1v for guile-user@gnu.org; Sat, 18 Feb 2017 11:59:07 -0500 Original-Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:36580) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cf8Le-0002Ju-Sc for guile-user@gnu.org; Sat, 18 Feb 2017 11:59:02 -0500 Original-Received: by mail-pg0-x244.google.com with SMTP id a123so4884538pgc.3 for ; Sat, 18 Feb 2017 08:59:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gfGHg8z/BEy1CR5fRzj9PWEt5V1GZ2XObt3ZkxTBx30=; b=LEXUkMXEeF7e2fKuCW7h+0gNHA5OfB84Sde59oxg0z2JhOLfXRFEaJ1Q3JMkDZj/C8 HhF83Lzxl3f+tqCUUx3SQuRJE5i+W7bHnAOcABge2AU5QtvaK5yxPv2kyQ/gr6c92e1G sjxfEFm3qdu0lzfisaL+T1c6j5KC7s6Xsd4Q7P6pU0dYkkzA+BGYWLM/ZE/B8ki1/Ezh fUGsRslixHAcavHncs5arMDc6A0S2a3fA+CPitS+22r2RwhRFC02OiEgbkkinU7eJA98 mKViPIC3f30+ak/OdquKnCSje+wM/36V0BcG32+krMFUrLRPaTbrlf/y3cFgpVvzQmSf vmAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gfGHg8z/BEy1CR5fRzj9PWEt5V1GZ2XObt3ZkxTBx30=; b=X5rlOk1jz53eXesC1WLoH8Pq64m9vhbfrx1+SJmxkeKHbyhPVfBgmUS9QdvUHn8uFh JG6t33fFQkgrinwoI+Ys5bZtjDqV2/vE1hg1whSTMi+zzeT6Sdu2IaVObmRU2dNc9tUD dEVVxXx3/u4nBDe81M5VMZQpAHX02zT9s2lwePoi1MzjJG9b9F7OZg0MuQHqLMMNR1yI BP87x176XYAGRnPQ3CC/+fwr+x/p3YrqYtox3oOkvkGCZ7dMJes2GdAi8qO4RNJVJBDA H8onIkLFy5W9STalRvQCUgvUO1ajsnvIX672aI9dvT/PkqFqU2gvv0Y9xq1Z/hcJqZXp L/Tg== X-Gm-Message-State: AMke39npKbG5XINVgfj+WCwO3GLRnHPExxoyOviklTgezCQ73tBnz3XqEwvxeEPyHnbKZg== X-Received: by 10.99.134.198 with SMTP id x189mr16620446pgd.171.1487437141912; Sat, 18 Feb 2017 08:59:01 -0800 (PST) Original-Received: from nautilus.championbroadband.com (216-165-246-244.championbroadband.com. [216.165.246.244]) by smtp.gmail.com with ESMTPSA id e4sm26336301pgc.45.2017.02.18.08.58.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Feb 2017 08:59:00 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3259) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c05::244 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13291 Archived-At: > On Feb 18, 2017, at 7:53 AM, Amirouche = wrote: > Le 18/02/2017 =C3=A0 16:50, Amirouche a =C3=A9crit : >> Le 18/02/2017 =C3=A0 01:13, Matt Wette a =C3=A9crit : >>> (use-modules (system repl repl)) >>> (use-modules (system repl debug)) >>>=20 >>> (define-syntax-rule (trap-here) >>> (start-repl >>> #:debug (make-debug (stack->vector (make-stack #t)) 0 "trap!" = #t))) >>>=20 >>> (define (foo) >>> (let iter ((sum 0) (vals '(1 2 3 5 8 2))) >>> (trap-here) >>> (if (null? vals) sum >>> (iter (+ sum (car vals)) (cdr vals))))) >>>=20 >>> (foo) >> It looks like that. Except `iter` should be defined in the namespace = of the REPL. > Maybe iter is complicated, but at least sum and vals. Hmm. The procedure =E2=80=9Cfoo=E2=80=9D without the "(trap-here)=E2=80=9D= is just a simple program (using named let) that I want to debug.=20 So I add the =E2=80=9C(trap-here)=E2=80=9D to get into the debugger at = that spot in the program, like I would add =E2=80=9Cpdb.set_trace()=E2=80=9D= in python. Matt