[lldb] Introduce StackFrameRecognizer
authorKuba Mracek <mracek@apple.com>
Wed, 31 Oct 2018 00:21:03 +0000 (00:21 +0000)
committerKuba Mracek <mracek@apple.com>
Wed, 31 Oct 2018 00:21:03 +0000 (00:21 +0000)
commitac0ba8c52493012daabb73512a5739394c37a2dc
tree60ae5cde6970cb9d828e8ca3c7bcdf2e4095b4c5
parent1079d7ccfeccf8344eb799bef392a875693ab353
[lldb] Introduce StackFrameRecognizer

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: 345678
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