diff options
author | Caroline Tice <ctice@apple.com> | 2010-09-20 20:44:43 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2010-09-20 20:44:43 +0000 |
commit | daccaa9e83e497c761d2012461c83947826be68d (patch) | |
tree | 00066f13e4de1e161ce0a880f1a7f5cba2c22a46 /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | c9cb0caeb7be722d906c5c3fa53adb7d04a9c8e9 (diff) | |
download | bcm5719-llvm-daccaa9e83e497c761d2012461c83947826be68d.tar.gz bcm5719-llvm-daccaa9e83e497c761d2012461c83947826be68d.zip |
Add UserSettings to Target class, making Target settings
the parent of Process settings; add 'default-arch' as a
class-wide setting for Target. Replace lldb::GetDefaultArchitecture
with Target::GetDefaultArchitecture & Target::SetDefaultArchitecture.
Add 'use-external-editor' as user setting to Debugger class & update
code appropriately.
Add Error parameter to methods that get user settings, for easier
reporting of bad requests.
Fix various other minor related bugs.
Fix test cases to work with new changes.
llvm-svn: 114352
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 48176f76b28..7b742c8ff1f 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -138,16 +138,7 @@ CommandInterpreter::LoadCommandDictionary () // Non-CommandObjectCrossref commands can now be created. - lldb::ScriptLanguage script_language; - lldb::SettableVariableType var_type = lldb::eSetVarTypeString; - StringList value; - const char *dbg_name = GetDebugger().GetInstanceName().AsCString(); - StreamString var_name; - var_name.Printf ("[%s].script-lang", dbg_name); - value = Debugger::GetSettingsController()->GetVariable (var_name.GetData(), var_type, - m_debugger.GetInstanceName().AsCString()); - bool success; - script_language = Args::StringToScriptLanguage (value.GetStringAtIndex(0), lldb::eScriptLanguageDefault, &success); + lldb::ScriptLanguage script_language = m_debugger.GetScriptLanguage(); m_command_dict["apropos"] = CommandObjectSP (new CommandObjectApropos (*this)); m_command_dict["breakpoint"]= CommandObjectSP (new CommandObjectMultiwordBreakpoint (*this)); @@ -778,21 +769,13 @@ CommandInterpreter::~CommandInterpreter () const char * CommandInterpreter::GetPrompt () { - lldb::SettableVariableType var_type; - const char *instance_name = GetDebugger().GetInstanceName().AsCString(); - StreamString var_name; - var_name.Printf ("[%s].prompt", instance_name); - return Debugger::GetSettingsController()->GetVariable (var_name.GetData(), var_type, instance_name).GetStringAtIndex(0); + return m_debugger.GetPrompt(); } void CommandInterpreter::SetPrompt (const char *new_prompt) { - const char *instance_name = GetDebugger().GetInstanceName().AsCString(); - StreamString name_str; - name_str.Printf ("[%s].prompt", instance_name); - Debugger::GetSettingsController()->SetVariable (name_str.GetData(), new_prompt, lldb::eVarSetOperationAssign, - false, m_debugger.GetInstanceName().AsCString()); + m_debugger.SetPrompt (new_prompt); } void |