28 Sep 21:16
Help me track down a tough bug? (probably funcfiletrace, subshells and possibly I/O redirection)
From: Rocky Bernstein <rocky.bernstein <at> gmail.com>
Subject: Help me track down a tough bug? (probably funcfiletrace, subshells and possibly I/O redirection)
Newsgroups: gmane.comp.shells.zsh.devel
Date: 2008-09-28 19:19:37 GMT
Expires: This article expires on 2008-10-12
Subject: Help me track down a tough bug? (probably funcfiletrace, subshells and possibly I/O redirection)
Newsgroups: gmane.comp.shells.zsh.devel
Date: 2008-09-28 19:19:37 GMT
Expires: This article expires on 2008-10-12
There is what looks to me a bug in the recent funcfiletrace that I've
been trying to isolate. I've spent the weekend on this and have made
some progress but have to stop now. Perhaps there's someone out there
who can help further pinpoint this bug.
You'll need the most recent zsh in CVS. If you have zshdb installed
(and chances are you don't) you can see the bug by
running this program under the debugger
#!/usr/local/bin/zsh
# Test debugger handling of subshells
(
x=$(print 5; print 6)
)
Below I'll show output from a sample session using the debugger. I've
put comments to the side (in #) to try to explain what's going on.
$ zshdb -q /tmp/zshdb/testing.sh # run testing.sh
(/tmp/zshdb/testing.sh:3): # file and line number
( x=$(print 5; print 6) ) # What's going to get run next
zshdb<4> s # 's' issues a "step" command
(/tmp/zshdb/testing.sh:4):
x=$(print 5; print 6) # Note we are in a subshell
zshdb<(5)> s # the () indicates this
(/tmp/zshdb/testing.sh:1):
print 5 # In a 2nd subshell, backtick
zshdb<((7))> where # ((..)) indicates this.
(Continue reading)
RSS Feed