[lldb] Introduce StackFrameRecognizer [take 2]
authorKuba Mracek <mracek@apple.com>
Wed, 31 Oct 2018 00:36:20 +0000 (00:36 +0000)
committerKuba Mracek <mracek@apple.com>
Wed, 31 Oct 2018 00:36:20 +0000 (00:36 +0000)
commit8fddd9818599663cee75b834c19df9bfd41a64f2
treed76b43ccc16f9e14fec315222030f6051f010e8c
parent3e27306565554fbf8f1c93a55f278856fe02c22e
[lldb] Introduce StackFrameRecognizer [take 2]

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: 345686
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
lldb/include/lldb/lldb-forward.h
lldb/lldb.xcodeproj/project.pbxproj
lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/Makefile
lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/TestFrameRecognizer.py
lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/main.m
lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/recognizer.py
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
lldb/www/python-reference.html