diff options
author | Kuba Mracek <mracek@apple.com> | 2018-10-31 00:21:03 +0000 |
---|---|---|
committer | Kuba Mracek <mracek@apple.com> | 2018-10-31 00:21:03 +0000 |
commit | ac0ba8c52493012daabb73512a5739394c37a2dc (patch) | |
tree | 60ae5cde6970cb9d828e8ca3c7bcdf2e4095b4c5 /lldb/source/API/SystemInitializerFull.cpp | |
parent | 1079d7ccfeccf8344eb799bef392a875693ab353 (diff) | |
download | bcm5719-llvm-ac0ba8c52493012daabb73512a5739394c37a2dc.tar.gz bcm5719-llvm-ac0ba8c52493012daabb73512a5739394c37a2dc.zip |
[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
Diffstat (limited to 'lldb/source/API/SystemInitializerFull.cpp')
-rw-r--r-- | lldb/source/API/SystemInitializerFull.cpp | 11 |
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, |