When my debugger and imagination fail me I will often resort to (Java) Thread.dumpStack() so I can at least figure out how I got into the mess I am trying to fix. I am trying to debug and fix someone else's ASH script and there is just too much going on for grep and print to help me localize and confirm.
I know there is some tracing ability available in ash but my recollection is that it is execution tracing which is somewhat more information that I need or want to sort through.
So, is there something I am missing, that is already there?
If not, is anyone else besides me interested in a new ash function, dumpStack(boolean abort)?
Without digging into the code to verify what I think is possible is feasible, I'm hoping for something like
dumpStack() called by testMe() in script.ash at line 3
testMe() called by somethingElse() in script.ash at line 27
somethingElse() called in main() in bigOne.ash at line 7.
If abort is true then dumpStack prints and then aborts, otherwise it prints and continues (returns).
Good idea? More trouble than it is worth? Only needed because of my lack of imagination?
Thanks.
I know there is some tracing ability available in ash but my recollection is that it is execution tracing which is somewhat more information that I need or want to sort through.
So, is there something I am missing, that is already there?
If not, is anyone else besides me interested in a new ash function, dumpStack(boolean abort)?
Without digging into the code to verify what I think is possible is feasible, I'm hoping for something like
dumpStack() called by testMe() in script.ash at line 3
testMe() called by somethingElse() in script.ash at line 27
somethingElse() called in main() in bigOne.ash at line 7.
If abort is true then dumpStack prints and then aborts, otherwise it prints and continues (returns).
Good idea? More trouble than it is worth? Only needed because of my lack of imagination?
Thanks.