Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Help me track down a tough bug? (probably funcfiletrace, subshells and possibly I/O redirection)
- X-seq: zsh-workers 25770
- From: Peter Stephenson <pws@xxxxxxx>
- To: "Rocky Bernstein" <rocky.bernstein@xxxxxxxxx>
- Subject: Re: Help me track down a tough bug? (probably funcfiletrace, subshells and possibly I/O redirection)
- Date: Mon, 29 Sep 2008 15:25:28 +0100
- Cc: "Zsh hackers list" <zsh-workers@xxxxxxxxxx>
- In-reply-to: <6cd6de210809290711j12363e1bo159e1739bae7b2fd@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <6cd6de210809281219i4bf1ed18mefa45b967fa835a6@xxxxxxxxxxxxxx> <20080928221651.6ee7f671@pws-pc> <6cd6de210809281932u2e04a844l219d1db5a7568a73@xxxxxxxxxxxxxx> <20080929095201.451381d0@news01> <6cd6de210809290411m60cb669bk3817d768adce378a@xxxxxxxxxxxxxx> <200809291125.m8TBPsQM005256@xxxxxxxxxxxxxx> <6cd6de210809290711j12363e1bo159e1739bae7b2fd@xxxxxxxxxxxxxx>
"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 <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author