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

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



On Sep 17,  3:14pm, Clint Adams wrote:
} Subject: PATCH: functrace [was Re: funcstack and backtraces]
}
} This is buggy when either FUNCTIONARGZERO is unset, int is larger than
} 64-bits, or... I forget.

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

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:

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?

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).



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