From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12752 invoked from network); 9 Jul 2001 18:37:14 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Jul 2001 18:37:14 -0000 Received: (qmail 10063 invoked by alias); 9 Jul 2001 18:37:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15341 Received: (qmail 10045 invoked from network); 9 Jul 2001 18:37:03 -0000 Message-ID: To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: Debugging of dynamocally defined functions In-reply-to: ""Bart Schaefer""'s message of "Mon, 09 Jul 2001 18:24:05 -0000." <1010709182405.ZM21152@candle.brasslantern.com> Date: Mon, 09 Jul 2001 19:36:35 +0100 From: Peter Stephenson "Bart Schaefer" wrote: > I was fooling with almost exactly the same thing, though I'd been trying > to figure out a nice way to embed the line number of the eval inside the > `(eval)' string; e.g. for an eval on line 30 of the calling function you > would see something like > > (30:eval):1: echo foo > (30:eval):2: echo bar > > etc. However, as the placment of %i and the use of colons or whatnot is > completely dependent on the PS4 setting, I couldn't decide how to do it > such that it wouldn't garble somebody's pretty prompt. Maybe we need to grab another prompt escape. Or maybe we could make a stack of environments and line numbers and you can choose whether you want the line number (e.g.) in the innermost eval, in the function above that, or in the script the function is embedded in, fixing the other problem, too --- if we can work out a way of deciding which the right one to print at any given time is. Maybe this needs more work to make quite sure scriptname and lineno are tied together. Maybe we can add an option to get errors to print a backtrace of that. Maybe I'm rambling. I've committed the patch for now. -- Peter Stephenson Software Engineer CSR Ltd., Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************