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

Re: PATCH: functrace [was Re: funcstack and backtraces]



> Adding an extra level of function stack avoids the crash, but this
> still doesn't look right to me:

What crash?

> schaefer<505> (bar() { foo } ; foo() { print $functrace } ; bar )
> bar:0 Src/zsh:bar:0
> 
> No mention of "foo" at all?  Whose idea of useful is that?  And here:

I was assuming that the function printing the trace would be able to
identify itself, but if not, "foo" is in $funcstack.  Shouldn't be too
difficult to tack it on in functracegetfn if that's useful though.

> schaefer<506> (baz() { bar }; 
>  bar() { foo } ;                                   
>  foo() { print $functrace } ;      
>  baz )
> bar:0 baz:0 Src/zsh:bar:0

> What does that it mean that "bar" is at both ends of the stack?

I can't reproduce that.  I get
bar:0 baz:0 Src/zsh:6
(or Src/zsh:0 Src/zsh:0 Src/Zsh:12)

> You're right about it being buggy when functionargzero is not set.
> Even the examples above that don't crash when it is set, crash when
> it is not set (with effectively the same backtrace).

I can't reproduce that either.



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