[lldb/Target] Add Assert StackFrame Recognizer
When a thread stops, this checks depending on the platform if the top frame is an abort stack frame. If so, it looks for an assert stack frame in the upper frames and set it as the most relavant frame when found. To do so, the StackFrameRecognizer class holds a "Most Relevant Frame" and a "cooked" stop reason description. When the thread is about to stop, it checks if the current frame is recognized, and if so, it fetches the recognized frame's attributes and applies them. rdar://58528686 Differential Revision: https://reviews.llvm.org/D73303 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
@@ -325,8 +325,11 @@ size_t SBThread::GetStopDescription(char *dst, size_t dst_len) {
|
||||
|
||||
StopInfoSP stop_info_sp = exe_ctx.GetThreadPtr()->GetStopInfo();
|
||||
if (stop_info_sp) {
|
||||
const char *stop_desc = stop_info_sp->GetDescription();
|
||||
if (stop_desc) {
|
||||
std::string thread_stop_desc =
|
||||
exe_ctx.GetThreadPtr()->GetStopDescription();
|
||||
const char *stop_desc = thread_stop_desc.c_str();
|
||||
|
||||
if (stop_desc[0] != '\0') {
|
||||
if (dst)
|
||||
return ::snprintf(dst, dst_len, "%s", stop_desc);
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user