diff options
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Commands/CommandObjectBreakpointCommand.cpp | 154 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectBreakpointCommand.h | 1 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectCommands.cpp | 154 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectImage.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Core/StringList.cpp | 7 | ||||
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 210 | ||||
-rw-r--r-- | lldb/source/Interpreter/CommandObject.cpp | 2 |
7 files changed, 373 insertions, 157 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp index 0024e6d2e80..edca869e48a 100644 --- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp @@ -45,20 +45,29 @@ CommandObjectBreakpointCommandAdd::CommandOptions::~CommandOptions () { } +// FIXME: "script-type" needs to have its contents determined dynamically, so somebody can add a new scripting +// language to lldb and have it pickable here without having to change this enumeration by hand and rebuild lldb proper. + +static lldb::OptionEnumValueElement +g_script_option_enumeration[4] = +{ + { eScriptLanguageNone, "command", "Commands are in the lldb command interpreter language"}, + { eScriptLanguagePython, "python", "Commands are in the Python language."}, + { eSortOrderByName, "default-script", "Commands are in the default scripting language."}, + { 0, NULL, NULL } +}; + lldb::OptionDefinition CommandObjectBreakpointCommandAdd::CommandOptions::g_option_table[] = { { LLDB_OPT_SET_ALL, false, "one-liner", 'o', required_argument, NULL, NULL, eArgTypeOneLiner, "Specify a one-line breakpoint command inline. Be sure to surround it with quotes." }, - { LLDB_OPT_SET_1, true, "script", 's', no_argument, NULL, NULL, eArgTypeNone, - "Write the breakpoint command script in the default scripting language."}, + { LLDB_OPT_SET_ALL, false, "stop-on-error", 'e', required_argument, NULL, NULL, eArgTypeBoolean, + "Specify whether breakpoint command execution should terminate on error." }, - { LLDB_OPT_SET_2, true, "python", 'p', no_argument, NULL, NULL, eArgTypeNone, - "Write the breakpoint command script in the Python scripting language."}, - - { LLDB_OPT_SET_3, true, "commands", 'c', no_argument, NULL, NULL, eArgTypeNone, - "Write the breakpoint command script using standard debugger commands."}, + { LLDB_OPT_SET_ALL, false, "script-type", 's', required_argument, g_script_option_enumeration, NULL, eArgTypeNone, + "Specify the language for the commands - if none is specified, the lldb command interpreter will be used."}, { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } }; @@ -83,26 +92,42 @@ CommandObjectBreakpointCommandAdd::CommandOptions::SetOptionValue switch (short_option) { case 'o': - m_use_one_liner = true; - m_one_liner = option_arg; - break; + m_use_one_liner = true; + m_one_liner = option_arg; + break; + break; case 's': - m_use_commands = false; - m_use_script_language = true; - m_script_language = eScriptLanguageDefault; - break; - case 'p': - m_use_commands = false; - m_use_script_language = true; - m_script_language = eScriptLanguagePython; - break; - case 'c': - m_use_commands = true; - m_use_script_language = false; - m_script_language = eScriptLanguageNone; - break; + { + bool found_one = false; + m_script_language = (lldb::ScriptLanguage) Args::StringToOptionEnum (option_arg, + g_option_table[option_idx].enum_values, + eScriptLanguageNone, + &found_one); + if (!found_one) + error.SetErrorStringWithFormat("Invalid enumeration value '%s' for option '%c'.\n", + option_arg, + short_option); + + if (m_script_language == eScriptLanguagePython || m_script_language == eScriptLanguageDefault) + { + m_use_commands = false; + m_use_script_language = true; + } + else + { + m_use_commands = true; + m_use_script_language = false; + } + } + break; + case 'e': + bool success_ptr; + m_stop_on_error = Args::StringToBoolean(option_arg, false, &success_ptr); + if (!success_ptr) + error.SetErrorStringWithFormat("Invalid value for stop-on-error: \"%s\".\n", option_arg); + break; default: - break; + break; } return error; } @@ -112,11 +137,12 @@ CommandObjectBreakpointCommandAdd::CommandOptions::ResetOptionValues () { Options::ResetOptionValues(); - m_use_commands = false; + m_use_commands = true; m_use_script_language = false; m_script_language = eScriptLanguageNone; m_use_one_liner = false; + m_stop_on_error = true; m_one_liner.clear(); } @@ -173,13 +199,13 @@ breakpoint commands. \n\ \n\ Example Python one-line breakpoint command: \n\ \n\ -(lldb) breakpoint command add -p 1 \n\ +(lldb) breakpoint command add -s python 1 \n\ Enter your Python command(s). Type 'DONE' to end. \n\ > print \"Hit this breakpoint!\" \n\ > DONE \n\ \n\ As a convenience, this also works for a short Python one-liner: \n\ -(lldb) breakpoint command add -p 1 -o \"import time; print time.asctime()\" \n\ +(lldb) breakpoint command add -s python 1 -o \"import time; print time.asctime()\" \n\ (lldb) run \n\ Launching '.../a.out' (x86_64) \n\ (lldb) Fri Sep 10 12:17:45 2010 \n\ @@ -196,7 +222,7 @@ Process 21778 Stopped \n\ \n\ Example multiple line Python breakpoint command, using function definition: \n\ \n\ -(lldb) breakpoint command add -p 1 \n\ +(lldb) breakpoint command add -s python 1 \n\ Enter your Python command(s). Type 'DONE' to end. \n\ > def breakpoint_output (bp_no): \n\ > out_string = \"Hit breakpoint number \" + repr (bp_no) \n\ @@ -208,7 +234,7 @@ Enter your Python command(s). Type 'DONE' to end. \n\ \n\ Example multiple line Python breakpoint command, using 'loose' Python: \n\ \n\ -(lldb) breakpoint command add -p 1 \n\ +(lldb) breakpoint command add -s p 1 \n\ Enter your Python command(s). Type 'DONE' to end. \n\ > global bp_count \n\ > bp_count = bp_count + 1 \n\ @@ -309,7 +335,7 @@ CommandObjectBreakpointCommandAdd::Execute bp_options = bp_loc_sp->GetLocationOptions(); } - // Skip this breakpoiont if bp_options is not good. + // Skip this breakpoint if bp_options is not good. if (bp_options == NULL) continue; // If we are using script language, get the script interpreter @@ -401,6 +427,7 @@ CommandObjectBreakpointCommandAdd::SetBreakpointCommandCallback (BreakpointOptio // while the latter is used for Python to interpret during the actual callback. data_ap->user_source.AppendString (oneliner); data_ap->script_source.AppendString (oneliner); + data_ap->stop_on_error = m_options.m_stop_on_error; BatonSP baton_sp (new BreakpointOptions::CommandBaton (data_ap.release())); bp_options->SetCallback (CommandObjectBreakpointCommand::BreakpointOptionsCallbackFunction, baton_sp); @@ -686,7 +713,9 @@ CommandObjectBreakpointCommandList::Execute if (bp_options) { StreamString id_str; - BreakpointID::GetCanonicalReference (&id_str, cur_bp_id.GetBreakpointID(), cur_bp_id.GetLocationID()); + BreakpointID::GetCanonicalReference (&id_str, + cur_bp_id.GetBreakpointID(), + cur_bp_id.GetLocationID()); const Baton *baton = bp_options->GetBaton(); if (baton) { @@ -697,7 +726,8 @@ CommandObjectBreakpointCommandList::Execute } else { - result.AppendMessageWithFormat ("Breakpoint %s does not have an associated command.\n", id_str.GetData()); + result.AppendMessageWithFormat ("Breakpoint %s does not have an associated command.\n", + id_str.GetData()); } } result.SetStatus (eReturnStatusSuccessFinishResult); @@ -763,55 +793,31 @@ CommandObjectBreakpointCommand::BreakpointOptionsCallbackFunction if (commands.GetSize() > 0) { - uint32_t num_commands = commands.GetSize(); CommandReturnObject result; if (context->exe_ctx.target) { Debugger &debugger = context->exe_ctx.target->GetDebugger(); - CommandInterpreter &interpreter = debugger.GetCommandInterpreter(); - - File &out_file = debugger.GetOutputFile(); - File &err_file = debugger.GetErrorFile(); - - uint32_t i; - for (i = 0; i < num_commands; ++i) + + bool stop_on_continue = true; + bool echo_commands = false; + bool print_results = true; + + debugger.GetCommandInterpreter().HandleCommands (commands, + &(context->exe_ctx), + stop_on_continue, + data->stop_on_error, + echo_commands, + print_results, + result); + // Now dump the commands to the debugger's output: + if (!result.Succeeded()) { - - // First time through we use the context from the stoppoint, after that we use whatever - // has been set by the previous command. - - if (!interpreter.HandleCommand (commands.GetStringAtIndex(i), false, result, &context->exe_ctx)) - break; - - // FIXME: This isn't really the right way to do this. We should be able to peek at the public - // to see if there is any new events, but that is racey, since the internal process thread has to run and - // deliver the event to the public queue before a run will show up. So for now we check - // the internal thread state. - - lldb::StateType internal_state = context->exe_ctx.process->GetPrivateState(); - if (internal_state != eStateStopped) - { - if (i < num_commands - 1) - { - out_file.Printf ("Short-circuiting command execution because target state changed to %s." - " last command: \"%s\"\n", StateAsCString(internal_state), - commands.GetStringAtIndex(i)); - } - break; - } - - out_file.Printf ("%s", result.GetErrorStream().GetData()); - err_file.Printf ("%s", result.GetOutputStream().GetData()); - result.Clear(); - result.SetStatus (eReturnStatusSuccessFinishNoResult); + debugger.GetErrorFile().Printf ("%s", result.GetErrorStream().GetData()); } + + debugger.GetOutputFile().Printf ("%s", result.GetOutputStream().GetData()); - if (!result.Succeeded() && i < num_commands) - err_file.Printf ("Attempt to execute '%s' failed.\n", commands.GetStringAtIndex(i)); - - out_file.Printf ("%s", result.GetErrorStream().GetData()); - err_file.Printf ("%s", result.GetOutputStream().GetData()); } } return ret_value; diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.h b/lldb/source/Commands/CommandObjectBreakpointCommand.h index 034a0e80727..51131d2ee04 100644 --- a/lldb/source/Commands/CommandObjectBreakpointCommand.h +++ b/lldb/source/Commands/CommandObjectBreakpointCommand.h @@ -122,6 +122,7 @@ public: // Instance variables to hold the values for one_liner options. bool m_use_one_liner; std::string m_one_liner; + bool m_stop_on_error; }; private: diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index e2358bda661..9230aea8ba1 100644 --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -22,14 +22,87 @@ using namespace lldb; using namespace lldb_private; -const char *k_space_characters = "\t\n\v\f\r "; - //------------------------------------------------------------------------- // CommandObjectCommandsSource //------------------------------------------------------------------------- class CommandObjectCommandsSource : public CommandObject { +private: + + class CommandOptions : public Options + { + public: + + CommandOptions (){} + + virtual + ~CommandOptions (){} + + virtual Error + SetOptionValue (int option_idx, const char *option_arg) + { + Error error; + char short_option = (char) m_getopt_table[option_idx].val; + bool success; + + switch (short_option) + { + case 'e': + m_stop_on_error = Args::StringToBoolean(option_arg, true, &success); + if (!success) + error.SetErrorStringWithFormat("Invalid value for stop-on-error: %s.\n", option_arg); + break; + case 'c': + m_stop_on_continue = Args::StringToBoolean(option_arg, true, &success); + if (!success) + error.SetErrorStringWithFormat("Invalid value for stop-on-continue: %s.\n", option_arg); + break; + default: + error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option); + break; + } + + return error; + } + + void + ResetOptionValues () + { + Options::ResetOptionValues(); + + m_stop_on_error = true; + m_stop_on_continue = true; + } + + const lldb::OptionDefinition* + GetDefinitions () + { + return g_option_table; + } + + // Options table: Required for subclasses of Options. + + static lldb::OptionDefinition g_option_table[]; + + // Instance variables to hold the values for command options. + + bool m_stop_on_error; + bool m_stop_on_continue; + }; + + // Options table: Required for subclasses of Options. + + static lldb::OptionDefinition g_option_table[]; + + CommandOptions m_options; + + virtual Options * + GetOptions () + { + return &m_options; + } + public: CommandObjectCommandsSource(CommandInterpreter &interpreter) : CommandObject (interpreter, @@ -66,68 +139,21 @@ public: if (argc == 1) { const char *filename = args.GetArgumentAtIndex(0); - bool success = true; result.AppendMessageWithFormat ("Executing commands in '%s'.\n", filename); FileSpec cmd_file (filename, true); - if (cmd_file.Exists()) - { - STLStringArray commands; - success = cmd_file.ReadFileLines (commands); - - STLStringArray::iterator pos = commands.begin(); - - // Trim out any empty lines or lines that start with the comment - // char '#' - while (pos != commands.end()) - { - size_t non_space = pos->find_first_not_of (k_space_characters); - // Check for empty line or comment line (lines whose first - // non-space character is a '#') - if (non_space == std::string::npos || (*pos)[non_space] == '#') - pos = commands.erase(pos); - else - ++pos; - } - - if (commands.size() > 0) - { - const size_t num_commands = commands.size(); - size_t i; - for (i = 0; i<num_commands; ++i) - { - result.GetOutputStream().Printf ("%s %s\n", - m_interpreter.GetPrompt(), - commands[i].c_str()); - if (!m_interpreter.HandleCommand(commands[i].c_str(), false, result)) - break; - } - - if (i < num_commands) - { - result.AppendErrorWithFormat("Aborting source of '%s' after command '%s' failed.\n", - filename, commands[i].c_str()); - result.SetStatus (eReturnStatusSuccessFinishResult); - } - else - { - success = true; - result.SetStatus (eReturnStatusFailed); - } - } - } - else - { - result.AppendErrorWithFormat ("File '%s' does not exist.\n", filename); - result.SetStatus (eReturnStatusFailed); - success = false; - } - - if (success) - { - result.SetStatus (eReturnStatusSuccessFinishNoResult); - } + ExecutionContext *exe_ctx = NULL; // Just use the default context. + bool echo_commands = true; + bool print_results = true; + + m_interpreter.HandleCommandsFromFile (cmd_file, + exe_ctx, + m_options.m_stop_on_continue, + m_options.m_stop_on_error, + echo_commands, + print_results, + result); } else { @@ -139,6 +165,14 @@ public: } }; +lldb::OptionDefinition +CommandObjectCommandsSource::CommandOptions::g_option_table[] = +{ +{ LLDB_OPT_SET_ALL, false, "stop-on-error", 'e', required_argument, NULL, 0, eArgTypeBoolean, "If true, stop executing commands on error."}, +{ LLDB_OPT_SET_ALL, false, "stop-on-continue", 'c', required_argument, NULL, 0, eArgTypeBoolean, "If true, stop executing commands on continue."}, +{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +}; + #pragma mark CommandObjectCommandsAlias //------------------------------------------------------------------------- // CommandObjectCommandsAlias diff --git a/lldb/source/Commands/CommandObjectImage.cpp b/lldb/source/Commands/CommandObjectImage.cpp index 6b4a89a9c33..771562a8f2c 100644 --- a/lldb/source/Commands/CommandObjectImage.cpp +++ b/lldb/source/Commands/CommandObjectImage.cpp @@ -784,7 +784,7 @@ protected: CommandOptions m_options; }; -lldb::OptionEnumValueElement +static lldb::OptionEnumValueElement g_sort_option_enumeration[4] = { { eSortOrderNone, "none", "No sorting, use the original symbol table order."}, diff --git a/lldb/source/Core/StringList.cpp b/lldb/source/Core/StringList.cpp index 61d78834966..92109bca088 100644 --- a/lldb/source/Core/StringList.cpp +++ b/lldb/source/Core/StringList.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "lldb/Core/StringList.h" +#include "lldb/Host/FileSpec.h" #include <string> @@ -72,6 +73,12 @@ StringList::AppendList (StringList strings) m_strings.push_back (strings.GetStringAtIndex(i)); } +bool +StringList::ReadFileLines (FileSpec &input_file) +{ + return input_file.ReadFileLines (m_strings); +} + uint32_t StringList::GetSize () { diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 8a302feccab..2a84eef91f1 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -67,7 +67,8 @@ CommandInterpreter::CommandInterpreter m_debugger (debugger), m_synchronous_execution (synchronous_execution), m_skip_lldbinit_files (false), - m_script_interpreter_ap () + m_script_interpreter_ap (), + m_comment_char ('#') { const char *dbg_name = debugger.GetInstanceName().AsCString(); std::string lang_name = ScriptInterpreter::LanguageToString (script_language); @@ -700,8 +701,11 @@ bool CommandInterpreter::HandleCommand (const char *command_line, bool add_to_history, CommandReturnObject &result, - ExecutionContext *override_context) + ExecutionContext *override_context, + bool repeat_on_empty_command) + { + bool done = false; CommandObject *cmd_obj = NULL; std::string next_word; @@ -722,26 +726,56 @@ CommandInterpreter::HandleCommand (const char *command_line, m_debugger.UpdateExecutionContext (override_context); - if (command_line == NULL || command_line[0] == '\0') + bool empty_command = false; + bool comment_command = false; + if (command_string.empty()) + empty_command = true; + else { - if (m_command_history.empty()) - { - result.AppendError ("empty command"); - result.SetStatus(eReturnStatusFailed); - return false; - } - else + const char *k_space_characters = "\t\n\v\f\r "; + + size_t non_space = command_string.find_first_not_of (k_space_characters); + // Check for empty line or comment line (lines whose first + // non-space character is the comment character for this interpreter) + if (non_space == std::string::npos) + empty_command = true; + else if (command_string[non_space] == m_comment_char) + comment_command = true; + } + + if (empty_command) + { + if (repeat_on_empty_command) { - command_line = m_repeat_command.c_str(); - command_string = command_line; - if (m_repeat_command.empty()) + if (m_command_history.empty()) { - result.AppendErrorWithFormat("No auto repeat.\n"); - result.SetStatus (eReturnStatusFailed); + result.AppendError ("empty command"); + result.SetStatus(eReturnStatusFailed); return false; } + else + { + command_line = m_repeat_command.c_str(); + command_string = command_line; + if (m_repeat_command.empty()) + { + result.AppendErrorWithFormat("No auto repeat.\n"); + result.SetStatus (eReturnStatusFailed); + return false; + } + } + add_to_history = false; + } + else + { + result.SetStatus (eReturnStatusSuccessFinishNoResult); + return true; } - add_to_history = false; + } + else if (comment_command) + { + result.SetStatus (eReturnStatusSuccessFinishNoResult); + return true; } // Phase 1. @@ -1458,11 +1492,13 @@ CommandInterpreter::SourceInitFile (bool in_cwd, CommandReturnObject &result) if (init_file.Exists()) { - char path[PATH_MAX]; - init_file.GetPath(path, sizeof(path)); - StreamString source_command; - source_command.Printf ("command source '%s'", path); - HandleCommand (source_command.GetData(), false, result); + ExecutionContext *exe_ctx = NULL; // We don't have any context yet. + bool stop_on_continue = true; + bool stop_on_error = false; + bool echo_commands = false; + bool print_results = false; + + HandleCommandsFromFile (init_file, exe_ctx, stop_on_continue, stop_on_error, echo_commands, print_results, result); } else { @@ -1471,6 +1507,138 @@ CommandInterpreter::SourceInitFile (bool in_cwd, CommandReturnObject &result) } } +void +CommandInterpreter::HandleCommands (StringList &commands, + ExecutionContext *override_context, + bool stop_on_continue, + bool stop_on_error, + bool echo_commands, + bool print_results, + CommandReturnObject &result) +{ + size_t num_lines = commands.GetSize(); + CommandReturnObject tmp_result; + + // If we are going to continue past a "continue" then we need to run the commands synchronously. + // Make sure you reset this value anywhere you return from the function. + + bool old_async_execution = m_debugger.GetAsyncExecution(); + + // If we've been given an execution context, set it at the start, but don't keep resetting it or we will + // cause series of commands that change the context, then do an operation that relies on that context to fail. + + if (override_context != NULL) + m_debugger.UpdateExecutionContext (override_context); + + if (!stop_on_continue) + { + m_debugger.SetAsyncExecution (false); + } + + for (int idx = 0; idx < num_lines; idx++) + { + const char *cmd = commands.GetStringAtIndex(idx); + if (cmd[0] == '\0') + continue; + + tmp_result.Clear(); + if (echo_commands) + { + result.AppendMessageWithFormat ("%s %s\n", + GetPrompt(), + cmd); + } + + bool success = HandleCommand(cmd, false, tmp_result, NULL); + + if (print_results) + { + if (tmp_result.Succeeded()) + result.AppendMessageWithFormat("%s", tmp_result.GetOutputStream().GetData()); + } + + if (!success || !tmp_result.Succeeded()) + { + if (stop_on_error) + { + result.AppendErrorWithFormat("Aborting reading of commands after command #%d: '%s' failed.\n", + idx, cmd); + result.SetStatus (eReturnStatusFailed); + m_debugger.SetAsyncExecution (old_async_execution); + return; + } + else if (print_results) + { + result.AppendMessageWithFormat ("Command #%d '%s' failed with error: %s.\n", + idx + 1, + cmd, + tmp_result.GetErrorStream().GetData()); + } + } + + // N.B. Can't depend on DidChangeProcessState, because the state coming into the command execution + // could be running (for instance in Breakpoint Commands. + // So we check the return value to see if it is has running in it. + if ((tmp_result.GetStatus() == eReturnStatusSuccessContinuingNoResult) + || (tmp_result.GetStatus() == eReturnStatusSuccessContinuingResult)) + { + if (stop_on_continue) + { + // If we caused the target to proceed, and we're going to stop in that case, set the + // status in our real result before returning. This is an error if the continue was not the + // last command in the set of commands to be run. + if (idx != num_lines - 1) + result.AppendErrorWithFormat("Aborting reading of commands after command #%d: '%s' continued the target.\n", + idx + 1, cmd); + else + result.AppendMessageWithFormat ("Command #%d '%s' continued the target.\n", idx + 1, cmd); + + result.SetStatus(tmp_result.GetStatus()); + m_debugger.SetAsyncExecution (old_async_execution); + + return; + } + } + + } + + result.SetStatus (eReturnStatusSuccessFinishResult); + m_debugger.SetAsyncExecution (old_async_execution); + + return; +} + +void +CommandInterpreter::HandleCommandsFromFile (FileSpec &cmd_file, + ExecutionContext *context, + bool stop_on_continue, + bool stop_on_error, + bool echo_command, + bool print_result, + CommandReturnObject &result) +{ + if (cmd_file.Exists()) + { + bool success; + StringList commands; + success = commands.ReadFileLines(cmd_file); + if (!success) + { + result.AppendErrorWithFormat ("Error reading commands from file: %s.\n", cmd_file.GetFilename().AsCString()); + result.SetStatus (eReturnStatusFailed); + return; + } + HandleCommands (commands, context, stop_on_continue, stop_on_error, echo_command, print_result, result); + } + else + { + result.AppendErrorWithFormat ("Error reading commands from file %s - file not found.\n", + cmd_file.GetFilename().AsCString()); + result.SetStatus (eReturnStatusFailed); + return; + } +} + ScriptInterpreter * CommandInterpreter::GetScriptInterpreter () { diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index 29589a909ec..2f88a4893c0 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -616,7 +616,7 @@ CommandObject::g_arguments_data[] = { eArgTypeEndAddress, "end-address", CommandCompletions::eNoCompletion, NULL, "Help text goes here." }, { eArgTypeExpression, "expr", CommandCompletions::eNoCompletion, NULL, "Help text goes here." }, { eArgTypeExprFormat, "expression-format", CommandCompletions::eNoCompletion, NULL, "[ [bool|b] | [bin] | [char|c] | [oct|o] | [dec|i|d|u] | [hex|x] | [float|f] | [cstr|s] ]" }, - { eArgTypeFilename, "filename", CommandCompletions::eNoCompletion, NULL, "The name of a file (can include path)." }, + { eArgTypeFilename, "filename", CommandCompletions::eDiskFileCompletion, NULL, "The name of a file (can include path)." }, { eArgTypeFormat, "format", CommandCompletions::eNoCompletion, NULL, "Help text goes here." }, { eArgTypeFrameIndex, "frame-index", CommandCompletions::eNoCompletion, NULL, "Index into a thread's list of frames." }, { eArgTypeFullName, "fullname", CommandCompletions::eNoCompletion, NULL, "Help text goes here." }, |