Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Request: a way to get the subshell level nesting



On Fri, 5 Sep 2008 17:36:37 -0400
"Rocky Bernstein" <rocky.bernstein@xxxxxxxxx> wrote:
> In a program such
> as bashdb when a "quit" is done we may really need to quit several levels of
> shells that may have gotten invoked in between.
> Suppose you were writing a debugger for GNU Make. You'd have the same issue.
> Or any program
> that might call itself recursively and you don't have control in between of
> how many *other* recursive shell invocations might have gone on.
> 
> So here we need the actual number counting whatever optimization was done,
> not the virtual number of shells.  And here I don't think it too bad to have
> the user aware that an optimization was done. When one debugs optimized C
> code in gcc there are corresponding issues that any competent programmer
> just needs to be aware of. Like in-lined functions or statements which
> appear out of order because that's the way assembly code was reorganized.

We'll have to see how this works out; I'm hoping that in fact any time
the debugger is hanging around the subshell won't be optimized out and
the question doesn't arise.  However, if you encounter oddities we can
certainly look at this again.  The trade off between expectation and
reality can be a bit elastic down here.

pws



Messages sorted by: Reverse Date, Date, Thread, Author