summaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/OptionGroupVariable.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/Interpreter/OptionGroupVariable.cpp
parent3e27306565554fbf8f1c93a55f278856fe02c22e (diff)
[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/Interpreter/OptionGroupVariable.cpp')
-rw-r--r--lldb/source/Interpreter/OptionGroupVariable.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/OptionGroupVariable.cpp b/lldb/source/Interpreter/OptionGroupVariable.cpp
index 1bcddb4b49f7..f35aeb6aa555 100644
--- a/lldb/source/Interpreter/OptionGroupVariable.cpp
+++ b/lldb/source/Interpreter/OptionGroupVariable.cpp
@@ -28,6 +28,9 @@ static constexpr OptionDefinition g_variable_options[] = {
{LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "no-args", 'a',
OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
"Omit function arguments."},
+ {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "no-recognized-args", 't',
+ OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
+ "Omit recognized function arguments."},
{LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "no-locals", 'l',
OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
"Omit local variables."},
@@ -101,6 +104,9 @@ OptionGroupVariable::SetOptionValue(uint32_t option_idx,
case 's':
show_scope = true;
break;
+ case 't':
+ show_recognized_args = false;
+ break;
case 'y':
error = summary.SetCurrentValue(option_arg);
break;
@@ -119,6 +125,7 @@ OptionGroupVariable::SetOptionValue(uint32_t option_idx,
void OptionGroupVariable::OptionParsingStarting(
ExecutionContext *execution_context) {
show_args = true; // Frame option only
+ show_recognized_args = true; // Frame option only
show_locals = true; // Frame option only
show_globals = false; // Frame option only
show_decl = false;