I'm working on a bug report where lldb crashes while trying to read the register that is used to calculate the canonical frame address for the first frame in a stack trace. I haven't figured out how they're getting in this state yet, but I want to add a check for a failure to find a register in this case, and declare the stack frame as invalid to handle the error. I also added an assert so we can catch it early in debug builds if it ever comes up here.
I think returning no valid stack frame for this thread is going to be a better failure mode than having the debugger crash out from under them, ending the debug session. It's still a pretty bad failure, but hopefully we can collect some logging with this if it comes up again.