diff options
author | Kuba Mracek <mracek@apple.com> | 2018-10-31 04:00:22 +0000 |
---|---|---|
committer | Kuba Mracek <mracek@apple.com> | 2018-10-31 04:00:22 +0000 |
commit | 41ae8e744531410943be6e67107b2f845e595ebb (patch) | |
tree | 5c5f4a1648f33aac37177856b334302d69c1b66a /lldb/source/API/SBVariablesOptions.cpp | |
parent | 7c44da279e399d302a685c500e7f802f8adf9762 (diff) | |
download | bcm5719-llvm-41ae8e744531410943be6e67107b2f845e595ebb.tar.gz bcm5719-llvm-41ae8e744531410943be6e67107b2f845e595ebb.zip |
[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
Diffstat (limited to 'lldb/source/API/SBVariablesOptions.cpp')
-rw-r--r-- | lldb/source/API/SBVariablesOptions.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/lldb/source/API/SBVariablesOptions.cpp b/lldb/source/API/SBVariablesOptions.cpp index e12b9696521..ae069756de1 100644 --- a/lldb/source/API/SBVariablesOptions.cpp +++ b/lldb/source/API/SBVariablesOptions.cpp @@ -16,9 +16,9 @@ using namespace lldb_private; class VariablesOptionsImpl { public: VariablesOptionsImpl() - : m_include_arguments(false), m_include_locals(false), - m_include_statics(false), m_in_scope_only(false), - m_include_runtime_support_values(false), + : m_include_arguments(false), m_include_recognized_arguments(false), + m_include_locals(false), m_include_statics(false), + m_in_scope_only(false), m_include_runtime_support_values(false), m_use_dynamic(lldb::eNoDynamicValues) {} VariablesOptionsImpl(const VariablesOptionsImpl &) = default; @@ -31,6 +31,14 @@ public: void SetIncludeArguments(bool b) { m_include_arguments = b; } + bool GetIncludeRecognizedArguments() const { + return m_include_recognized_arguments; + } + + void SetIncludeRecognizedArguments(bool b) { + m_include_recognized_arguments = b; + } + bool GetIncludeLocals() const { return m_include_locals; } void SetIncludeLocals(bool b) { m_include_locals = b; } @@ -57,6 +65,7 @@ public: private: bool m_include_arguments : 1; + bool m_include_recognized_arguments : 1; bool m_include_locals : 1; bool m_include_statics : 1; bool m_in_scope_only : 1; @@ -90,6 +99,14 @@ void SBVariablesOptions::SetIncludeArguments(bool arguments) { m_opaque_ap->SetIncludeArguments(arguments); } +bool SBVariablesOptions::GetIncludeRecognizedArguments() const { + return m_opaque_ap->GetIncludeRecognizedArguments(); +} + +void SBVariablesOptions::SetIncludeRecognizedArguments(bool arguments) { + m_opaque_ap->SetIncludeRecognizedArguments(arguments); +} + bool SBVariablesOptions::GetIncludeLocals() const { return m_opaque_ap->GetIncludeLocals(); } |