While tinkering for an answer to this question, I found that debug_backtrace() doesn\'t trace beyond the function registered to register_shutdown_function
From my experience, the shutdown function starts with a clean stack, and it has no access to the "original" stack (as it no longer exists at that point).
Unfortunately, there is no way to save that original stack.