From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29330 invoked from network); 29 Sep 2008 14:26:52 -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,WEIRD_PORT autolearn=no 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; 29 Sep 2008 14:26:52 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 64168 invoked from network); 29 Sep 2008 14:26:48 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Sep 2008 14:26:48 -0000 Received: (qmail 15558 invoked by alias); 29 Sep 2008 14:26:42 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25770 Received: (qmail 15549 invoked from network); 29 Sep 2008 14:26:42 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 29 Sep 2008 14:26:42 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [217.69.20.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 18AF280309AA for ; Mon, 29 Sep 2008 16:26:33 +0200 (CEST) Received: from rly44d.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly44d.srv.mailcontrol.com (MailControl) with ESMTP id m8TEQUl2001263 for ; Mon, 29 Sep 2008 15:26:30 +0100 Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly44d.srv.mailcontrol.com (MailControl) id m8TEPV1v028569 for zsh-workers@sunsite.dk; Mon, 29 Sep 2008 15:25:31 +0100 Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly44d-eth0.srv.mailcontrol.com (envelope-sender Peter.Stephenson@csr.com) (MIMEDefang) with ESMTP id m8TEPR8Q028224; Mon, 29 Sep 2008 15:25:31 +0100 (BST) Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Mon, 29 Sep 2008 15:25:29 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id m8TEPTZJ007208; Mon, 29 Sep 2008 15:25:29 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id m8TEPSoR007204; Mon, 29 Sep 2008 15:25:29 +0100 Message-Id: <200809291425.m8TEPSoR007204@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: "Rocky Bernstein" cc: "Zsh hackers list" Subject: Re: Help me track down a tough bug? (probably funcfiletrace, subshells and possibly I/O redirection) In-reply-to: <6cd6de210809290711j12363e1bo159e1739bae7b2fd@mail.gmail.com> References: <6cd6de210809281219i4bf1ed18mefa45b967fa835a6@mail.gmail.com> <20080928221651.6ee7f671@pws-pc> <6cd6de210809281932u2e04a844l219d1db5a7568a73@mail.gmail.com> <20080929095201.451381d0@news01> <6cd6de210809290411m60cb669bk3817d768adce378a@mail.gmail.com> <200809291125.m8TBPsQM005256@news01.csr.com> <6cd6de210809290711j12363e1bo159e1739bae7b2fd@mail.gmail.com> Comments: In-reply-to "Rocky Bernstein" message dated "Mon, 29 Sep 2008 10:11:57 -0400." Date: Mon, 29 Sep 2008 15:25:28 +0100 From: Peter Stephenson X-OriginalArrivalTime: 29 Sep 2008 14:25:29.0460 (UTC) FILETIME=[39318340:01C9223F] X-Scanned-By: MailControl A-08-50-15 (www.mailcontrol.com) on 10.68.1.154 X-Virus-Scanned: ClamAV 0.92.1/8353/Mon Sep 29 11:57:09 2008 on bifrost X-Virus-Status: Clean "Rocky Bernstein" wrote: > ./zshdb2.sh > ./zshdb2.sh:39 ./zshdb2.sh:34 # Debug output in lib/frame.sh > > # Above should be: ./lib/hook.sh:5 ./zshdb2.sh:34 > # note: 34+5=39 Ah, I see, so this should be fairly obvious once I track back and see what the code referred to is... I'll try and get round to this this evening. > Suppose eval line numbers were reset but it is shown as a call in the > stack traces as it is in Python and Ruby. This code then > > # This is line 5 > eval "x=1; > y=$LINENO" > > would set y to 2 since that's the second line in the eval. Since eval > is a POSIX "special" builtin, let's say there is an eval2 which allows > optional file and line number parameters > > eval "x=1; > y=$LINENO" 10 foo.c > > Then y would be set to 10. And *stack* routines where we can see > filename, it would be "foo.c" There is already an EVALLINENO option to control the line number behaviour in eval. I wouldn't plan on making this even more complicated without some clear evidence of need. Use of (the not-yet-properly-named) ZSH_FILE_LINE looks likely to be more useful. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070