summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SystemInitializerFull.cpp
diff options
context:
space:
mode:
authorKuba Mracek <mracek@apple.com>2018-10-31 00:36:20 +0000
committerKuba Mracek <mracek@apple.com>2018-10-31 00:36:20 +0000
commit8fddd9818599663cee75b834c19df9bfd41a64f2 (patch)
treed76b43ccc16f9e14fec315222030f6051f010e8c /lldb/source/API/SystemInitializerFull.cpp
parent3e27306565554fbf8f1c93a55f278856fe02c22e (diff)
downloadbcm5719-llvm-8fddd9818599663cee75b834c19df9bfd41a64f2.tar.gz
bcm5719-llvm-8fddd9818599663cee75b834c19df9bfd41a64f2.zip
[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
Diffstat (limited to 'lldb/source/API/SystemInitializerFull.cpp')
-rw-r--r--lldb/source/API/SystemInitializerFull.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp
index fab9171c478..2e649d5baea 100644
--- a/lldb/source/API/SystemInitializerFull.cpp
+++ b/lldb/source/API/SystemInitializerFull.cpp
@@ -235,6 +235,13 @@ LLDBSWIGPythonCreateOSPlugin(const char *python_class_name,
const char *session_dictionary_name,
const lldb::ProcessSP &process_sp);
+extern "C" void *LLDBSWIGPython_CreateFrameRecognizer(
+ const char *python_class_name,
+ const char *session_dictionary_name);
+
+extern "C" void *LLDBSwigPython_GetRecognizedArguments(void *implementor,
+ const lldb::StackFrameSP& frame_sp);
+
extern "C" bool LLDBSWIGPythonRunScriptKeywordProcess(
const char *python_function_name, const char *session_dictionary_name,
lldb::ProcessSP &process, std::string &output);
@@ -423,7 +430,9 @@ void SystemInitializerFull::InitializeSWIG() {
LLDBSwigPython_MightHaveChildrenSynthProviderInstance,
LLDBSwigPython_GetValueSynthProviderInstance, LLDBSwigPythonCallCommand,
LLDBSwigPythonCallCommandObject, LLDBSwigPythonCallModuleInit,
- LLDBSWIGPythonCreateOSPlugin, LLDBSWIGPythonRunScriptKeywordProcess,
+ LLDBSWIGPythonCreateOSPlugin, LLDBSWIGPython_CreateFrameRecognizer,
+ LLDBSwigPython_GetRecognizedArguments,
+ LLDBSWIGPythonRunScriptKeywordProcess,
LLDBSWIGPythonRunScriptKeywordThread,
LLDBSWIGPythonRunScriptKeywordTarget, LLDBSWIGPythonRunScriptKeywordFrame,
LLDBSWIGPythonRunScriptKeywordValue, LLDBSWIGPython_GetDynamicSetting,
OpenPOWER on IntegriCloud