[lldb] Introduce StackFrameRecognizer [take 3]
authorKuba Mracek <mracek@apple.com>
Wed, 31 Oct 2018 04:00:22 +0000 (04:00 +0000)
committerKuba Mracek <mracek@apple.com>
Wed, 31 Oct 2018 04:00:22 +0000 (04:00 +0000)
commit41ae8e744531410943be6e67107b2f845e595ebb
tree5c5f4a1648f33aac37177856b334302d69c1b66a
parent7c44da279e399d302a685c500e7f802f8adf9762
[lldb] Introduce StackFrameRecognizer [take 3]

This patch introduces a concept of "frame recognizer" and "recognized frame". This should be an extensible mechanism that retrieves information about special frames based on ABI, arguments or other special properties of that frame, even without source code. A few examples where that could be useful could be 1) objc_exception_throw, where we'd like to get the current exception, 2) terminate_with_reason and extracting the current terminate string, 3) recognizing Objective-C frames and automatically extracting the receiver+selector, or perhaps all arguments (based on selector).

Differential Revision: https://reviews.llvm.org/D44603

llvm-svn: 345693
24 files changed:
lldb/include/lldb/API/SBVariablesOptions.h
lldb/include/lldb/Interpreter/OptionGroupVariable.h
lldb/include/lldb/Interpreter/ScriptInterpreter.h
lldb/include/lldb/Target/StackFrame.h
lldb/include/lldb/Target/StackFrameRecognizer.h [new file with mode: 0644]
lldb/include/lldb/lldb-forward.h
lldb/lldb.xcodeproj/project.pbxproj
lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/Makefile [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/TestFrameRecognizer.py [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/main.m [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/recognizer.py [new file with mode: 0644]
lldb/scripts/Python/python-wrapper.swig
lldb/scripts/interface/SBVariablesOptions.i
lldb/source/API/SBFrame.cpp
lldb/source/API/SBVariablesOptions.cpp
lldb/source/API/SystemInitializerFull.cpp
lldb/source/Commands/CommandObjectFrame.cpp
lldb/source/Interpreter/OptionGroupVariable.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
lldb/source/Target/CMakeLists.txt
lldb/source/Target/StackFrame.cpp
lldb/source/Target/StackFrameRecognizer.cpp [new file with mode: 0644]
lldb/www/python-reference.html