From: Peter Stephenson <pws@csr.com>
To: "Rocky Bernstein" <rocky.bernstein@gmail.com>
Cc: "Zsh hackers list" <zsh-workers@sunsite.dk>
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 [thread overview]
Message-ID: <200809291425.m8TEPSoR007204@news01.csr.com> (raw)
In-Reply-To: <6cd6de210809290711j12363e1bo159e1739bae7b2fd@mail.gmail.com>
"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@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
next prev parent reply other threads:[~2008-09-29 14:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6cd6de210809281219i4bf1ed18mefa45b967fa835a6@mail.gmail.com>
[not found] ` <20080928221651.6ee7f671@pws-pc>
2008-09-29 2:32 ` Rocky Bernstein
2008-09-29 8:52 ` Peter Stephenson
2008-09-29 11:11 ` Rocky Bernstein
2008-09-29 11:25 ` Peter Stephenson
2008-09-29 14:11 ` Rocky Bernstein
2008-09-29 14:25 ` Peter Stephenson [this message]
2008-09-29 21:42 ` Peter Stephenson
2008-09-30 0:18 ` Rocky Bernstein
2008-09-30 16:53 ` Peter Stephenson
2008-09-30 17:59 ` Rocky Bernstein
2008-09-30 18:01 ` Rocky Bernstein
2008-10-01 11:31 ` Peter Stephenson
2008-10-01 15:45 ` Rocky Bernstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200809291425.m8TEPSoR007204@news01.csr.com \
--to=pws@csr.com \
--cc=rocky.bernstein@gmail.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).