Investigate whether gcc provides enough information to place kprobes into the function-exit path, so that last-gasp locals might be accessible, sort of like a "kpreretprobe".
See http://gcc.gnu.org/PR49167
As I noted on the gcc PR, getting the imminent $return value from a tail-call converted function may not be easy or even possible.
It could help to have gcc emit DW_LNS_set_epilogue_begin markers, but there appears to be no gcc bugzilla entry requesting that. (Plus accessing the return value at that moment could be tricky as it may not yet reside in the ABI-fixed value.)
(In reply to comment #1) > See http://gcc.gnu.org/0 The link in this comment looks corrupted, but I think this is the right one: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49167