[all-commits] [llvm/llvm-project] 03a6b8: [lldb/Target] Add Assert StackFrame Recognizer

Med Ismail Bennani via All-commits all-commits at lists.llvm.org
Tue Jan 28 09:21:54 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 03a6b858fde5c644ec16b1fddd8e10aa9ef3f0ad
      https://github.com/llvm/llvm-project/commit/03a6b858fde5c644ec16b1fddd8e10aa9ef3f0ad
  Author: Med Ismail Bennani <medismail.bennani at gmail.com>
  Date:   2020-01-28 (Tue, 28 Jan 2020)

  Changed paths:
    M lldb/docs/use/formatting.rst
    M lldb/include/lldb/Core/FormatEntity.h
    A lldb/include/lldb/Target/AssertFrameRecognizer.h
    M lldb/include/lldb/Target/StackFrameRecognizer.h
    M lldb/include/lldb/Target/Thread.h
    M lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py
    M lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
    M lldb/source/API/SBThread.cpp
    M lldb/source/Core/FormatEntity.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
    A lldb/source/Target/AssertFrameRecognizer.cpp
    M lldb/source/Target/CMakeLists.txt
    M lldb/source/Target/Process.cpp
    M lldb/source/Target/StackFrameRecognizer.cpp
    M lldb/source/Target/Thread.cpp
    A lldb/test/Shell/Recognizer/Inputs/assert.c
    A lldb/test/Shell/Recognizer/assert.test

  Log Message:
  -----------
  [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 at gmail.com>




More information about the All-commits mailing list