diff options
author | Jim Ingham <jingham@apple.com> | 2010-07-10 02:27:39 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2010-07-10 02:27:39 +0000 |
commit | a56c800607c6e4f59cb2722c736eedf6e0eccd0d (patch) | |
tree | b3e6eb2a0d5217161af200c4ab7f80ba06cd3f70 /lldb/source/Commands/CommandObjectThread.cpp | |
parent | 35b21fef65071c86d9d18daa16cc566c657f1048 (diff) | |
download | bcm5719-llvm-a56c800607c6e4f59cb2722c736eedf6e0eccd0d.tar.gz bcm5719-llvm-a56c800607c6e4f59cb2722c736eedf6e0eccd0d.zip |
Add an "Avoid Frames matching this regular expression" to ThreadPlanStepInRange.
This relies on ThreadPlanStepOut working correctly, which it doesn't currently for Inlined functions, so this feature is only partially useful until we take care of Stepping Out of inlined functions.
Added an option to "thread step-in" to set the avoid regular expression. This is mostly for testing, once the Setting code is redone, we'll move this to a general setting.
llvm-svn: 108036
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectThread.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index 85829124b41..0934045fd5b 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -383,6 +383,12 @@ public: error.SetErrorStringWithFormat("Invalid enumeration value for option '%c'.\n", short_option); } break; + case 'r': + { + m_avoid_regexp.clear(); + m_avoid_regexp.assign(option_arg); + } + break; default: error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option); break; @@ -397,6 +403,7 @@ public: Options::ResetOptionValues(); m_avoid_no_debug = true; m_run_mode = eOnlyDuringStepping; + m_avoid_regexp.clear(); } const lldb::OptionDefinition* @@ -412,6 +419,7 @@ public: // Instance variables to hold the values for command options. bool m_avoid_no_debug; RunMode m_run_mode; + std::string m_avoid_regexp; }; CommandObjectThreadStepWithTypeAndScope (const char *name, @@ -514,6 +522,11 @@ public: frame->GetSymbolContext(eSymbolContextEverything), stop_other_threads, m_options.m_avoid_no_debug); + if (new_plan && !m_options.m_avoid_regexp.empty()) + { + ThreadPlanStepInRange *step_in_range_plan = static_cast<ThreadPlanStepInRange *> (new_plan); + step_in_range_plan->SetAvoidRegexp(m_options.m_avoid_regexp.c_str()); + } } else new_plan = thread->QueueThreadPlanForStepSingleInstruction (false, abort_other_plans, bool_stop_other_threads); @@ -621,6 +634,7 @@ CommandObjectThreadStepWithTypeAndScope::CommandOptions::g_option_table[] = { { LLDB_OPT_SET_1, false, "avoid_no_debug", 'a', required_argument, NULL, 0, "<avoid_no_debug>", "Should step-in step over functions with no debug information"}, { LLDB_OPT_SET_1, false, "run_mode", 'm', required_argument, g_tri_running_mode, 0, "<run_mode>", "Determine how to run other threads while stepping this one"}, +{ LLDB_OPT_SET_1, false, "regexp_to_avoid",'r', required_argument, NULL, 0, "<avoid_regexp>", "Should step-in step over functions matching this regexp"}, { 0, false, NULL, 0, 0, NULL, 0, NULL, NULL } }; |