From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29193 invoked from network); 18 Sep 2008 15:40:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 Sep 2008 15:40:05 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 34282 invoked from network); 18 Sep 2008 15:39:56 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Sep 2008 15:39:56 -0000 Received: (qmail 12898 invoked by alias); 18 Sep 2008 15:39:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25688 Received: (qmail 12879 invoked from network); 18 Sep 2008 15:39:48 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 18 Sep 2008 15:39:48 -0000 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by bifrost.dotsrc.org (Postfix) with ESMTP id 5852C802720D for ; Thu, 18 Sep 2008 17:39:32 +0200 (CEST) Received: by wa-out-1112.google.com with SMTP id v27so2479741wah.21 for ; Thu, 18 Sep 2008 08:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=Dit1Cl+NtWt2PurPe3HTtvajzumGFIRQw7Q+zKC2W64=; b=AW/d1C+ecQ6HjEGRP28M2yrGk3Z2qHNFLiRWEmP5iAKY6u/i0KVbOvYaasSoeekZj8 yRbOOTsuqVIWHhyZLtJVZFOH8xxJdX/G3xo4MXHBjun3vvEF21/kXOsKCcXY7QSl6wQC wZkB0IosK8PO4S5arsdmQ10C1N6ozsUIe39gk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=PIa9EytiwWz6x+uoEkO9NIhmIUXUbJwNMK0LoyeVWyi+Gv9mB7sOQxZ3cuHbFyJXBZ j1RshL7sQW4vkTOj7s7rVR8w+ywny0KvyWJ/3NIt74WW+elNflgWfXpFJZWbdW21kM7M I33RqHAr1V1+Bjarc7KIQvxBm/XStTxqw1Hgg= Received: by 10.115.18.3 with SMTP id v3mr3933051wai.180.1221752371337; Thu, 18 Sep 2008 08:39:31 -0700 (PDT) Received: by 10.114.159.2 with HTTP; Thu, 18 Sep 2008 08:39:31 -0700 (PDT) Message-ID: <6cd6de210809180839v3a8b7dcr10a9591e505b9d2a@mail.gmail.com> Date: Thu, 18 Sep 2008 11:39:31 -0400 From: "Rocky Bernstein" To: "Peter Stephenson" Subject: Re: PATCH: source file info from PS4 Cc: "Zsh hackers list" In-Reply-To: <200809181525.m8IFPWSg018460@news01.csr.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_15559_24782524.1221752371324" References: <6005.1221576641@csr.com> <6cd6de210809170939p968d36bufda419592a10cb45@mail.gmail.com> <20080918131320.2d7f88f4@news01> <6cd6de210809180805w6a60f2eft222e436176659fe4@mail.gmail.com> <6cd6de210809180822y15f5c97bn44844f4ef76b22a7@mail.gmail.com> <200809181525.m8IFPWSg018460@news01.csr.com> X-Virus-Scanned: ClamAV 0.92.1/8279/Thu Sep 18 14:42:42 2008 on bifrost X-Virus-Status: Clean ------=_Part_15559_24782524.1221752371324 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline How does one use TRAPNAL for the "DEBUG" signal? On Thu, Sep 18, 2008 at 11:25 AM, Peter Stephenson wrote: > "Rocky Bernstein" wrote: > > But suppose one wrote a profiler, or just some sort of signal handler. > Don't > > you want to be able to debug via PS4 the same as any other code? > > You can do that using the TRAPNAL() { ... } form of trap, which records > line numbers like any other function. I'll have to make sure this is > documented somewhere. > > -- > Peter Stephenson Software Engineer > CSR PLC, Churchill House, Cambridge Business Park, Cowley Road > Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 > ------=_Part_15559_24782524.1221752371324 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
How does one use TRAPNAL for the "DEBUG" signal?

On Thu, Sep 18, 2008 at 11:25 AM, Peter Stephenson <pws@csr.com> wrote:
"Rocky Bernstein" wrote:
> But suppose one wrote a profiler, or just some sort of signal handler. Don't
> you want to be able to debug via PS4 the same as any other code?

You can do that using the TRAPNAL() { ... } form of trap, which records
line numbers like any other function.  I'll have to make sure this is
documented somewhere.

--
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070

------=_Part_15559_24782524.1221752371324--