Hi all,
I’m attaching a proposed patch to fix an issue where lldb will seg fault if for some reason there is no unwinder when StackFrameList::GetFramesUpTo() is called.
The scenario where I’m hitting it is more fundamentally broken (the triple is unknown) - this small patch is just to stop lldb from crashing.
Thanks!
Sincerely,
Todd Fiala
null_unwinder.diff (1.86 KB)
Looks good.
% svn commit
Sending source/Target/StackFrameList.cpp
Transmitting file data .
Committed revision 195499.
For what it's worth, the unwinder is picked in Thread::GetStackFrameStatus() - we have a "last resort" unwinder for Apple triples that tries to walk the stack by following a frame chain for i386 or x86_64. Might be good to fall back to that even if the triple isn't -apple-.
(wouldn't have helped in this case where you didn't even have an architecture, let alone an OS, defined, but fwiw.)
Thanks, Jason! That’s good to know how it works in other cases.
My unknown target situation should be going away shortly here once we move over to something based on the lldb-debugserver feeding better info to lldb.