diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
commit | f73363f1dd94996356cefbf24388f561891acf0b (patch) | |
tree | e3c31248bdb36eaec5fd833490d4278162dba2a0 /source/Commands/CommandObjectBreakpointCommand.cpp | |
parent | 160ee69dd7ae18978f4068116777639ea98dc951 (diff) |
Notes
Diffstat (limited to 'source/Commands/CommandObjectBreakpointCommand.cpp')
-rw-r--r-- | source/Commands/CommandObjectBreakpointCommand.cpp | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/source/Commands/CommandObjectBreakpointCommand.cpp b/source/Commands/CommandObjectBreakpointCommand.cpp index 170cb8513116..f2546cbed848 100644 --- a/source/Commands/CommandObjectBreakpointCommand.cpp +++ b/source/Commands/CommandObjectBreakpointCommand.cpp @@ -22,6 +22,7 @@ #include "lldb/Host/OptionParser.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/CommandReturnObject.h" +#include "lldb/Interpreter/OptionArgParser.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" @@ -293,7 +294,7 @@ are no syntax errors may indicate that a function was declared but never called. break; case 's': - m_script_language = (lldb::ScriptLanguage)Args::StringToOptionEnum( + m_script_language = (lldb::ScriptLanguage)OptionArgParser::ToOptionEnum( option_arg, g_breakpoint_add_options[option_idx].enum_values, eScriptLanguageNone, error); @@ -307,7 +308,8 @@ are no syntax errors may indicate that a function was declared but never called. case 'e': { bool success = false; - m_stop_on_error = Args::StringToBoolean(option_arg, false, &success); + m_stop_on_error = + OptionArgParser::ToBoolean(option_arg, false, &success); if (!success) error.SetErrorStringWithFormat( "invalid value for stop-on-error: \"%s\"", @@ -410,8 +412,8 @@ protected: } else { BreakpointLocationSP bp_loc_sp( bp->FindLocationByID(cur_bp_id.GetLocationID())); - // This breakpoint does have an associated location. - // Get its breakpoint options. + // This breakpoint does have an associated location. Get its + // breakpoint options. if (bp_loc_sp) bp_options = bp_loc_sp->GetLocationOptions(); } @@ -420,9 +422,9 @@ protected: } } - // If we are using script language, get the script interpreter - // in order to set or collect command callback. Otherwise, call - // the methods associated with this object. + // If we are using script language, get the script interpreter in order + // to set or collect command callback. Otherwise, call the methods + // associated with this object. if (m_options.m_use_script_language) { ScriptInterpreter *script_interp = m_interpreter.GetScriptInterpreter(); // Special handling for one-liner specified inline. @@ -454,16 +456,15 @@ private: std::vector<BreakpointOptions *> m_bp_options_vec; // This stores the // breakpoint options that // we are currently - // collecting commands for. In the CollectData... calls we need - // to hand this off to the IOHandler, which may run asynchronously. - // So we have to have some way to keep it alive, and not leak it. - // Making it an ivar of the command object, which never goes away - // achieves this. Note that if we were able to run - // the same command concurrently in one interpreter we'd have to - // make this "per invocation". But there are many more reasons - // why it is not in general safe to do that in lldb at present, - // so it isn't worthwhile to come up with a more complex mechanism - // to address this particular weakness right now. + // collecting commands for. In the CollectData... calls we need to hand this + // off to the IOHandler, which may run asynchronously. So we have to have + // some way to keep it alive, and not leak it. Making it an ivar of the + // command object, which never goes away achieves this. Note that if we were + // able to run the same command concurrently in one interpreter we'd have to + // make this "per invocation". But there are many more reasons why it is not + // in general safe to do that in lldb at present, so it isn't worthwhile to + // come up with a more complex mechanism to address this particular weakness + // right now. static const char *g_reader_instructions; }; |