diff options
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Commands/CommandObjectSettings.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Core/Debugger.cpp | 24 | ||||
-rw-r--r-- | lldb/source/Core/UserSettingsController.cpp | 5 | ||||
-rw-r--r-- | lldb/source/Target/Process.cpp | 4 |
4 files changed, 28 insertions, 7 deletions
diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp index a4a3643d7bf..ff06172c5eb 100644 --- a/lldb/source/Commands/CommandObjectSettings.cpp +++ b/lldb/source/Commands/CommandObjectSettings.cpp @@ -82,7 +82,7 @@ CommandObjectSettingsSet::Execute (CommandInterpreter &interpreter, const int argc = command.GetArgumentCount (); - if (argc < 2) + if ((argc < 2) && (!m_options.m_reset)) { result.AppendError ("'settings set' takes more arguments"); result.SetStatus (eReturnStatusFailed); diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 9ccd2c16612..aa7d08a8827 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -689,7 +689,16 @@ DebuggerInstanceSettings::UpdateInstanceSettingsVariable (const ConstString &var UserSettingsController::UpdateStringVariable (op, m_prompt, value, err); if (!pending) { - BroadcastPromptChange (instance_name, m_prompt.c_str()); + // 'instance_name' is actually (probably) in the form '[<instance_name>]'; if so, we need to + // strip off the brackets before passing it to BroadcastPromptChange. + + std::string tmp_instance_name (instance_name.AsCString()); + if ((tmp_instance_name[0] == '[') + && (tmp_instance_name[instance_name.GetLength() - 1] == ']')) + tmp_instance_name = tmp_instance_name.substr (1, instance_name.GetLength() - 2); + ConstString new_name (tmp_instance_name.c_str()); + + BroadcastPromptChange (new_name, m_prompt.c_str()); } } else if (var_name == ScriptLangVarName()) @@ -746,7 +755,18 @@ DebuggerInstanceSettings::CopyInstanceSettings (const lldb::InstanceSettingsSP & m_prompt = new_debugger_settings->m_prompt; if (!pending) - BroadcastPromptChange (m_instance_name, m_prompt.c_str()); + { + // 'instance_name' is actually (probably) in the form '[<instance_name>]'; if so, we need to + // strip off the brackets before passing it to BroadcastPromptChange. + + std::string tmp_instance_name (m_instance_name.AsCString()); + if ((tmp_instance_name[0] == '[') + && (tmp_instance_name[m_instance_name.GetLength() - 1] == ']')) + tmp_instance_name = tmp_instance_name.substr (1, m_instance_name.GetLength() - 2); + ConstString new_name (tmp_instance_name.c_str()); + + BroadcastPromptChange (new_name, m_prompt.c_str()); + } m_script_lang = new_debugger_settings->m_script_lang; } diff --git a/lldb/source/Core/UserSettingsController.cpp b/lldb/source/Core/UserSettingsController.cpp index 554ea76bedd..9fd0c5c211c 100644 --- a/lldb/source/Core/UserSettingsController.cpp +++ b/lldb/source/Core/UserSettingsController.cpp @@ -1042,13 +1042,14 @@ UserSettingsController::GetAllVariableValues (CommandInterpreter &interpreter, StringList value = root->GetVariable (full_var_name.GetData(), var_type); description.Clear(); if (value.GetSize() == 1) - description.Printf ("%s (%s) = %s", full_var_name.GetData(), GetTypeString (entry.var_type), + description.Printf ("%s (%s) = '%s'", full_var_name.GetData(), GetTypeString (entry.var_type), value.GetStringAtIndex (0)); else { - description.Printf ("%s (%s) = ", full_var_name.GetData(), GetTypeString (entry.var_type)); + description.Printf ("%s (%s) = '", full_var_name.GetData(), GetTypeString (entry.var_type)); for (int j = 0; j < value.GetSize(); ++j) description.Printf ("%s ", value.GetStringAtIndex (j)); + description.Printf ("'"); } result_stream.Printf ("%s\n", description.GetData()); diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 4a6e26953e7..19b0d4f81e6 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -2196,7 +2196,7 @@ ProcessInstanceSettings::InputPathVarName () const ConstString & ProcessInstanceSettings::OutputPathVarName () { - static ConstString output_path_var_name ("output_path"); + static ConstString output_path_var_name ("output-path"); return output_path_var_name; } @@ -2204,7 +2204,7 @@ ProcessInstanceSettings::OutputPathVarName () const ConstString & ProcessInstanceSettings::ErrorPathVarName () { - static ConstString error_path_var_name ("error_path"); + static ConstString error_path_var_name ("error-path"); return error_path_var_name; } |