summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Debugger.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-08-22 18:39:03 +0000
committerGreg Clayton <gclayton@apple.com>2012-08-22 18:39:03 +0000
commit6920b52be6f8731692a9bff4fe6a7b596cda00c5 (patch)
tree48998e76a15a5165a7ca5f6eecb90a08a88dfadb /lldb/source/Core/Debugger.cpp
parent6f0bf8049a4dc08afaba8bfd6bb9a1cd4c77e1b7 (diff)
downloadbcm5719-llvm-6920b52be6f8731692a9bff4fe6a7b596cda00c5.tar.gz
bcm5719-llvm-6920b52be6f8731692a9bff4fe6a7b596cda00c5.zip
Remove further outdated "settings" code and also implement a few missing things.
llvm-svn: 162376
Diffstat (limited to 'lldb/source/Core/Debugger.cpp')
-rw-r--r--lldb/source/Core/Debugger.cpp940
1 files changed, 17 insertions, 923 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 3a2da84578d..682d57cd4bf 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -65,91 +65,6 @@ GetDebuggerList()
static DebuggerList g_list;
return g_list;
}
-//
-//
-//static const ConstString &
-//PromptVarName ()
-//{
-// static ConstString g_const_string ("prompt");
-// return g_const_string;
-//}
-//
-//static const ConstString &
-//GetNotifyVoidName ()
-//{
-// static ConstString g_const_string ("notify-void");
-// return g_const_string;
-//}
-//
-//static const ConstString &
-//GetFrameFormatName ()
-//{
-// static ConstString g_const_string ("frame-format");
-// return g_const_string;
-//}
-//
-//static const ConstString &
-//GetThreadFormatName ()
-//{
-// static ConstString g_const_string ("thread-format");
-// return g_const_string;
-//}
-//
-//static const ConstString &
-//ScriptLangVarName ()
-//{
-// static ConstString g_const_string ("script-lang");
-// return g_const_string;
-//}
-//
-//static const ConstString &
-//TermWidthVarName ()
-//{
-// static ConstString g_const_string ("term-width");
-// return g_const_string;
-//}
-//
-//static const ConstString &
-//UseExternalEditorVarName ()
-//{
-// static ConstString g_const_string ("use-external-editor");
-// return g_const_string;
-//}
-//
-//static const ConstString &
-//AutoConfirmName ()
-//{
-// static ConstString g_const_string ("auto-confirm");
-// return g_const_string;
-//}
-//
-//static const ConstString &
-//StopSourceContextBeforeName ()
-//{
-// static ConstString g_const_string ("stop-line-count-before");
-// return g_const_string;
-//}
-//
-//static const ConstString &
-//StopSourceContextAfterName ()
-//{
-// static ConstString g_const_string ("stop-line-count-after");
-// return g_const_string;
-//}
-//
-//static const ConstString &
-//StopDisassemblyCountName ()
-//{
-// static ConstString g_const_string ("stop-disassembly-count");
-// return g_const_string;
-//}
-//
-//static const ConstString &
-//StopDisassemblyDisplayName ()
-//{
-// static ConstString g_const_string ("stop-disassembly-display");
-// return g_const_string;
-//}
OptionEnumValueElement
g_show_disassembly_enum_values[] =
@@ -383,33 +298,13 @@ Debugger::Terminate ()
void
Debugger::SettingsInitialize ()
{
-// static bool g_initialized = false;
-//
-// if (!g_initialized)
-// {
-// g_initialized = true;
-// UserSettingsController::InitializeSettingsController (GetSettingsController(),
-// SettingsController::global_settings_table,
-// SettingsController::instance_settings_table);
-// // Now call SettingsInitialize for each settings 'child' of Debugger
-// Target::SettingsInitialize ();
-// }
+ Target::SettingsInitialize ();
}
void
Debugger::SettingsTerminate ()
{
-//
-// // Must call SettingsTerminate() for each settings 'child' of Debugger, before terminating the Debugger's
-// // Settings.
-//
-// Target::SettingsTerminate ();
-//
-// // Now terminate the Debugger Settings.
-//
-// UserSettingsControllerSP &usc = GetSettingsController();
-// UserSettingsController::FinalizeSettingsController (usc);
-// usc.reset();
+ Target::SettingsTerminate ();
}
DebuggerSP
@@ -452,22 +347,21 @@ DebuggerSP
Debugger::FindDebuggerWithInstanceName (const ConstString &instance_name)
{
DebuggerSP debugger_sp;
- // TODO: SETTINGS
-// if (g_shared_debugger_refcount > 0)
-// {
-// Mutex::Locker locker (GetDebuggerListMutex ());
-// DebuggerList &debugger_list = GetDebuggerList();
-// DebuggerList::iterator pos, end = debugger_list.end();
-//
-// for (pos = debugger_list.begin(); pos != end; ++pos)
-// {
-// if ((*pos).get()->m_instance_name == instance_name)
-// {
-// debugger_sp = *pos;
-// break;
-// }
-// }
-// }
+ if (g_shared_debugger_refcount > 0)
+ {
+ Mutex::Locker locker (GetDebuggerListMutex ());
+ DebuggerList &debugger_list = GetDebuggerList();
+ DebuggerList::iterator pos, end = debugger_list.end();
+
+ for (pos = debugger_list.begin(); pos != end; ++pos)
+ {
+ if ((*pos).get()->m_instance_name == instance_name)
+ {
+ debugger_sp = *pos;
+ break;
+ }
+ }
+ }
return debugger_sp;
}
@@ -2591,803 +2485,3 @@ Debugger::EnableLog (const char *channel, const char **categories, const char *l
return false;
}
-#pragma mark Debugger::SettingsController
-
-//--------------------------------------------------
-// class Debugger::SettingsController
-//--------------------------------------------------
-
-//Debugger::SettingsController::SettingsController () :
-// UserSettingsController ("", UserSettingsControllerSP())
-//{
-//}
-//
-//Debugger::SettingsController::~SettingsController ()
-//{
-//}
-//
-//
-//InstanceSettingsSP
-//Debugger::SettingsController::CreateInstanceSettings (const char *instance_name)
-//{
-// InstanceSettingsSP new_settings_sp (new DebuggerInstanceSettings (GetSettingsController(),
-// false,
-// instance_name));
-// return new_settings_sp;
-//}
-
-#pragma mark DebuggerInstanceSettings
-//--------------------------------------------------
-// class DebuggerInstanceSettings
-//--------------------------------------------------
-
-//DebuggerInstanceSettings::DebuggerInstanceSettings
-//(
-// const UserSettingsControllerSP &m_owner_sp,
-// bool live_instance,
-// const char *name
-//) :
-// InstanceSettings (m_owner_sp, name ? name : InstanceSettings::InvalidName().AsCString(), live_instance),
-// m_term_width (80),
-// m_stop_source_before_count (3),
-// m_stop_source_after_count (3),
-// m_stop_disassembly_count (4),
-// m_stop_disassembly_display (eStopDisassemblyTypeNoSource),
-// m_prompt (),
-// m_frame_format (),
-// m_thread_format (),
-// m_script_lang (),
-// m_use_external_editor (false),
-// m_auto_confirm_on (false)
-//{
-// // CopyInstanceSettings is a pure virtual function in InstanceSettings; it therefore cannot be called
-// // until the vtables for DebuggerInstanceSettings are properly set up, i.e. AFTER all the initializers.
-// // For this reason it has to be called here, rather than in the initializer or in the parent constructor.
-// // The same is true of CreateInstanceName().
-//
-// if (GetInstanceName() == InstanceSettings::InvalidName())
-// {
-// ChangeInstanceName (std::string (CreateInstanceName().AsCString()));
-// m_owner_sp->RegisterInstanceSettings (this);
-// }
-//
-// if (live_instance)
-// {
-// const InstanceSettingsSP &pending_settings = m_owner_sp->FindPendingSettings (m_instance_name);
-// CopyInstanceSettings (pending_settings, false);
-// }
-//}
-//
-//DebuggerInstanceSettings::DebuggerInstanceSettings (const DebuggerInstanceSettings &rhs) :
-// InstanceSettings (Debugger::GetSettingsController(), CreateInstanceName ().AsCString()),
-// m_prompt (rhs.m_prompt),
-// m_frame_format (rhs.m_frame_format),
-// m_thread_format (rhs.m_thread_format),
-// m_script_lang (rhs.m_script_lang),
-// m_use_external_editor (rhs.m_use_external_editor),
-// m_auto_confirm_on(rhs.m_auto_confirm_on)
-//{
-// UserSettingsControllerSP owner_sp (m_owner_wp.lock());
-// if (owner_sp)
-// {
-// CopyInstanceSettings (owner_sp->FindPendingSettings (m_instance_name), false);
-// owner_sp->RemovePendingSettings (m_instance_name);
-// }
-//}
-//
-//DebuggerInstanceSettings::~DebuggerInstanceSettings ()
-//{
-//}
-//
-//DebuggerInstanceSettings&
-//DebuggerInstanceSettings::operator= (const DebuggerInstanceSettings &rhs)
-//{
-// if (this != &rhs)
-// {
-// m_term_width = rhs.m_term_width;
-// m_prompt = rhs.m_prompt;
-// m_frame_format = rhs.m_frame_format;
-// m_thread_format = rhs.m_thread_format;
-// m_script_lang = rhs.m_script_lang;
-// m_use_external_editor = rhs.m_use_external_editor;
-// m_auto_confirm_on = rhs.m_auto_confirm_on;
-// }
-//
-// return *this;
-//}
-//
-//bool
-//DebuggerInstanceSettings::ValidTermWidthValue (const char *value, Error err)
-//{
-// bool valid = false;
-//
-// // Verify we have a value string.
-// if (value == NULL || value[0] == '\0')
-// {
-// err.SetErrorString ("missing value, can't set terminal width without a value");
-// }
-// else
-// {
-// char *end = NULL;
-// const uint32_t width = ::strtoul (value, &end, 0);
-//
-// if (end && end[0] == '\0')
-// {
-// return ValidTermWidthValue (width, err);
-// }
-// else
-// err.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string", value);
-// }
-//
-// return valid;
-//}
-//
-//bool
-//DebuggerInstanceSettings::ValidTermWidthValue (uint32_t value, Error err)
-//{
-// if (value >= 10 && value <= 1024)
-// return true;
-// else
-// {
-// err.SetErrorString ("invalid term-width value; value must be between 10 and 1024");
-// return false;
-// }
-//}
-//
-//void
-//DebuggerInstanceSettings::UpdateInstanceSettingsVariable (const ConstString &var_name,
-// const char *index_value,
-// const char *value,
-// const ConstString &instance_name,
-// const SettingEntry &entry,
-// VarSetOperationType op,
-// Error &err,
-// bool pending)
-//{
-//
-// if (var_name == TermWidthVarName())
-// {
-// if (ValidTermWidthValue (value, err))
-// {
-// m_term_width = ::strtoul (value, NULL, 0);
-// }
-// }
-// else if (var_name == PromptVarName())
-// {
-// UserSettingsController::UpdateStringVariable (op, m_prompt, value, err);
-// if (!pending)
-// {
-// // '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 == GetFrameFormatName())
-// {
-// UserSettingsController::UpdateStringVariable (op, m_frame_format, value, err);
-// }
-// else if (var_name == GetThreadFormatName())
-// {
-// UserSettingsController::UpdateStringVariable (op, m_thread_format, value, err);
-// }
-// else if (var_name == ScriptLangVarName())
-// {
-// bool success;
-// m_script_lang = Args::StringToScriptLanguage (value, eScriptLanguageDefault,
-// &success);
-// }
-// else if (var_name == UseExternalEditorVarName ())
-// {
-// UserSettingsController::UpdateBooleanVariable (op, m_use_external_editor, value, false, err);
-// }
-// else if (var_name == AutoConfirmName ())
-// {
-// UserSettingsController::UpdateBooleanVariable (op, m_auto_confirm_on, value, false, err);
-// }
-// else if (var_name == StopSourceContextBeforeName ())
-// {
-// uint32_t new_value = Args::StringToUInt32(value, UINT32_MAX, 10, NULL);
-// if (new_value != UINT32_MAX)
-// m_stop_source_before_count = new_value;
-// else
-// err.SetErrorStringWithFormat("invalid unsigned string value '%s' for the '%s' setting", value, StopSourceContextBeforeName ().GetCString());
-// }
-// else if (var_name == StopSourceContextAfterName ())
-// {
-// uint32_t new_value = Args::StringToUInt32(value, UINT32_MAX, 10, NULL);
-// if (new_value != UINT32_MAX)
-// m_stop_source_after_count = new_value;
-// else
-// err.SetErrorStringWithFormat("invalid unsigned string value '%s' for the '%s' setting", value, StopSourceContextAfterName ().GetCString());
-// }
-// else if (var_name == StopDisassemblyCountName ())
-// {
-// uint32_t new_value = Args::StringToUInt32(value, UINT32_MAX, 10, NULL);
-// if (new_value != UINT32_MAX)
-// m_stop_disassembly_count = new_value;
-// else
-// err.SetErrorStringWithFormat("invalid unsigned string value '%s' for the '%s' setting", value, StopDisassemblyCountName ().GetCString());
-// }
-// else if (var_name == StopDisassemblyDisplayName ())
-// {
-// int new_value;
-// UserSettingsController::UpdateEnumVariable (g_show_disassembly_enum_values, &new_value, value, err);
-// if (err.Success())
-// m_stop_disassembly_display = (StopDisassemblyType)new_value;
-// }
-//}
-//
-//bool
-//DebuggerInstanceSettings::GetInstanceSettingsValue (const SettingEntry &entry,
-// const ConstString &var_name,
-// StringList &value,
-// Error *err)
-//{
-// if (var_name == PromptVarName())
-// {
-// value.AppendString (m_prompt.c_str(), m_prompt.size());
-//
-// }
-// else if (var_name == ScriptLangVarName())
-// {
-// value.AppendString (ScriptInterpreter::LanguageToString (m_script_lang).c_str());
-// }
-// else if (var_name == TermWidthVarName())
-// {
-// StreamString width_str;
-// width_str.Printf ("%u", m_term_width);
-// value.AppendString (width_str.GetData());
-// }
-// else if (var_name == GetFrameFormatName ())
-// {
-// value.AppendString(m_frame_format.c_str(), m_frame_format.size());
-// }
-// else if (var_name == GetThreadFormatName ())
-// {
-// value.AppendString(m_thread_format.c_str(), m_thread_format.size());
-// }
-// else if (var_name == UseExternalEditorVarName())
-// {
-// if (m_use_external_editor)
-// value.AppendString ("true");
-// else
-// value.AppendString ("false");
-// }
-// else if (var_name == AutoConfirmName())
-// {
-// if (m_auto_confirm_on)
-// value.AppendString ("true");
-// else
-// value.AppendString ("false");
-// }
-// else if (var_name == StopSourceContextAfterName ())
-// {
-// StreamString strm;
-// strm.Printf ("%u", m_stop_source_after_count);
-// value.AppendString (strm.GetData());
-// }
-// else if (var_name == StopSourceContextBeforeName ())
-// {
-// StreamString strm;
-// strm.Printf ("%u", m_stop_source_before_count);
-// value.AppendString (strm.GetData());
-// }
-// else if (var_name == StopDisassemblyCountName ())
-// {
-// StreamString strm;
-// strm.Printf ("%u", m_stop_disassembly_count);
-// value.AppendString (strm.GetData());
-// }
-// else if (var_name == StopDisassemblyDisplayName ())
-// {
-// if (m_stop_disassembly_display >= eStopDisassemblyTypeNever && m_stop_disassembly_display <= eStopDisassemblyTypeAlways)
-// value.AppendString (g_show_disassembly_enum_values[m_stop_disassembly_display].string_value);
-// else
-// value.AppendString ("<invalid>");
-// }
-// else
-// {
-// if (err)
-// err->SetErrorStringWithFormat ("unrecognized variable name '%s'", var_name.AsCString());
-// return false;
-// }
-// return true;
-//}
-//
-//void
-//DebuggerInstanceSettings::CopyInstanceSettings (const InstanceSettingsSP &new_settings,
-// bool pending)
-//{
-// if (new_settings.get() == NULL)
-// return;
-//
-// DebuggerInstanceSettings *new_debugger_settings = (DebuggerInstanceSettings *) new_settings.get();
-//
-// m_prompt = new_debugger_settings->m_prompt;
-// if (!pending)
-// {
-// // '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_frame_format = new_debugger_settings->m_frame_format;
-// m_thread_format = new_debugger_settings->m_thread_format;
-// m_term_width = new_debugger_settings->m_term_width;
-// m_script_lang = new_debugger_settings->m_script_lang;
-// m_use_external_editor = new_debugger_settings->m_use_external_editor;
-// m_auto_confirm_on = new_debugger_settings->m_auto_confirm_on;
-//}
-//
-//
-//bool
-//DebuggerInstanceSettings::BroadcastPromptChange (const ConstString &instance_name, const char *new_prompt)
-//{
-// std::string tmp_prompt;
-//
-// if (new_prompt != NULL)
-// {
-// tmp_prompt = new_prompt ;
-// int len = tmp_prompt.size();
-// if (len > 1
-// && (tmp_prompt[0] == '\'' || tmp_prompt[0] == '"')
-// && (tmp_prompt[len-1] == tmp_prompt[0]))
-// {
-// tmp_prompt = tmp_prompt.substr(1,len-2);
-// }
-// len = tmp_prompt.size();
-// if (tmp_prompt[len-1] != ' ')
-// tmp_prompt.append(" ");
-// }
-// EventSP new_event_sp;
-// new_event_sp.reset (new Event(CommandInterpreter::eBroadcastBitResetPrompt,
-// new EventDataBytes (tmp_prompt.c_str())));
-//
-// if (instance_name.GetLength() != 0)
-// {
-// // Set prompt for a particular instance.
-// Debugger *dbg = Debugger::FindDebuggerWithInstanceName (instance_name).get();
-// if (dbg != NULL)
-// {
-// dbg->GetCommandInterpreter().BroadcastEvent (new_event_sp);
-// }
-// }
-//
-// return true;
-//}
-//
-//const ConstString
-//DebuggerInstanceSettings::CreateInstanceName ()
-//{
-// static int instance_count = 1;
-// StreamString sstr;
-//
-// sstr.Printf ("debugger_%d", instance_count);
-// ++instance_count;
-//
-// const ConstString ret_val (sstr.GetData());
-//
-// return ret_val;
-//}
-//
-//
-
-//DebuggerInstanceSettings::DebuggerInstanceSettings
-//(
-// const UserSettingsControllerSP &m_owner_sp,
-// bool live_instance,
-// const char *name
-//) :
-// InstanceSettings (m_owner_sp, name ? name : InstanceSettings::InvalidName().AsCString(), live_instance),
-// m_term_width (80),
-// m_stop_source_before_count (3),
-// m_stop_source_after_count (3),
-// m_stop_disassembly_count (4),
-// m_stop_disassembly_display (eStopDisassemblyTypeNoSource),
-// m_prompt (),
-// m_notify_void (false),
-// m_frame_format (),
-// m_thread_format (),
-// m_script_lang (),
-// m_use_external_editor (false),
-// m_auto_confirm_on (false)
-//{
-// // CopyInstanceSettings is a pure virtual function in InstanceSettings; it therefore cannot be called
-// // until the vtables for DebuggerInstanceSettings are properly set up, i.e. AFTER all the initializers.
-// // For this reason it has to be called here, rather than in the initializer or in the parent constructor.
-// // The same is true of CreateInstanceName().
-//
-// if (GetInstanceName() == InstanceSettings::InvalidName())
-// {
-// ChangeInstanceName (std::string (CreateInstanceName().AsCString()));
-// m_owner_sp->RegisterInstanceSettings (this);
-// }
-//
-// if (live_instance)
-// {
-// const InstanceSettingsSP &pending_settings = m_owner_sp->FindPendingSettings (m_instance_name);
-// CopyInstanceSettings (pending_settings, false);
-// }
-//}
-//
-//DebuggerInstanceSettings::DebuggerInstanceSettings (const DebuggerInstanceSettings &rhs) :
-// InstanceSettings (Debugger::GetSettingsController(), CreateInstanceName ().AsCString()),
-// m_prompt (rhs.m_prompt),
-// m_notify_void (rhs.m_notify_void),
-// m_frame_format (rhs.m_frame_format),
-// m_thread_format (rhs.m_thread_format),
-// m_script_lang (rhs.m_script_lang),
-// m_use_external_editor (rhs.m_use_external_editor),
-// m_auto_confirm_on(rhs.m_auto_confirm_on)
-//{
-// UserSettingsControllerSP owner_sp (m_owner_wp.lock());
-// if (owner_sp)
-// {
-// CopyInstanceSettings (owner_sp->FindPendingSettings (m_instance_name), false);
-// owner_sp->RemovePendingSettings (m_instance_name);
-// }
-//}
-//
-//DebuggerInstanceSettings::~DebuggerInstanceSettings ()
-//{
-//}
-//
-//DebuggerInstanceSettings&
-//DebuggerInstanceSettings::operator= (const DebuggerInstanceSettings &rhs)
-//{
-// if (this != &rhs)
-// {
-// m_term_width = rhs.m_term_width;
-// m_prompt = rhs.m_prompt;
-// m_notify_void = rhs.m_notify_void;
-// m_frame_format = rhs.m_frame_format;
-// m_thread_format = rhs.m_thread_format;
-// m_script_lang = rhs.m_script_lang;
-// m_use_external_editor = rhs.m_use_external_editor;
-// m_auto_confirm_on = rhs.m_auto_confirm_on;
-// }
-//
-// return *this;
-//}
-//
-//bool
-//DebuggerInstanceSettings::ValidTermWidthValue (const char *value, Error err)
-//{
-// bool valid = false;
-//
-// // Verify we have a value string.
-// if (value == NULL || value[0] == '\0')
-// {
-// err.SetErrorString ("missing value, can't set terminal width without a value");
-// }
-// else
-// {
-// char *end = NULL;
-// const uint32_t width = ::strtoul (value, &end, 0);
-//
-// if (end && end[0] == '\0')
-// {
-// return ValidTermWidthValue (width, err);
-// }
-// else
-// err.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string", value);
-// }
-//
-// return valid;
-//}
-//
-//bool
-//DebuggerInstanceSettings::ValidTermWidthValue (uint32_t value, Error err)
-//{
-// if (value >= 10 && value <= 1024)
-// return true;
-// else
-// {
-// err.SetErrorString ("invalid term-width value; value must be between 10 and 1024");
-// return false;
-// }
-//}
-//
-//void
-//DebuggerInstanceSettings::UpdateInstanceSettingsVariable (const ConstString &var_name,
-// const char *index_value,
-// const char *value,
-// const ConstString &instance_name,
-// const SettingEntry &entry,
-// VarSetOperationType op,
-// Error &err,
-// bool pending)
-//{
-//
-// if (var_name == TermWidthVarName())
-// {
-// if (ValidTermWidthValue (value, err))
-// {
-// m_term_width = ::strtoul (value, NULL, 0);
-// }
-// }
-// else if (var_name == PromptVarName())
-// {
-// UserSettingsController::UpdateStringVariable (op, m_prompt, value, err);
-// if (!pending)
-// {
-// // '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 == GetNotifyVoidName())
-// {
-// UserSettingsController::UpdateBooleanVariable (op, m_notify_void, value, false, err);
-// }
-// else if (var_name == GetFrameFormatName())
-// {
-// UserSettingsController::UpdateStringVariable (op, m_frame_format, value, err);
-// }
-// else if (var_name == GetThreadFormatName())
-// {
-// UserSettingsController::UpdateStringVariable (op, m_thread_format, value, err);
-// }
-// else if (var_name == ScriptLangVarName())
-// {
-// bool success;
-// m_script_lang = Args::StringToScriptLanguage (value, eScriptLanguageDefault,
-// &success);
-// }
-// else if (var_name == UseExternalEditorVarName ())
-// {
-// UserSettingsController::UpdateBooleanVariable (op, m_use_external_editor, value, false, err);
-// }
-// else if (var_name == AutoConfirmName ())
-// {
-// UserSettingsController::UpdateBooleanVariable (op, m_auto_confirm_on, value, false, err);
-// }
-// else if (var_name == StopSourceContextBeforeName ())
-// {
-// uint32_t new_value = Args::StringToUInt32(value, UINT32_MAX, 10, NULL);
-// if (new_value != UINT32_MAX)
-// m_stop_source_before_count = new_value;
-// else
-// err.SetErrorStringWithFormat("invalid unsigned string value '%s' for the '%s' setting", value, StopSourceContextBeforeName ().GetCString());
-// }
-// else if (var_name == StopSourceContextAfterName ())
-// {
-// uint32_t new_value = Args::StringToUInt32(value, UINT32_MAX, 10, NULL);
-// if (new_value != UINT32_MAX)
-// m_stop_source_after_count = new_value;
-// else
-// err.SetErrorStringWithFormat("invalid unsigned string value '%s' for the '%s' setting", value, StopSourceContextAfterName ().GetCString());
-// }
-// else if (var_name == StopDisassemblyCountName ())
-// {
-// uint32_t new_value = Args::StringToUInt32(value, UINT32_MAX, 10, NULL);
-// if (new_value != UINT32_MAX)
-// m_stop_disassembly_count = new_value;
-// else
-// err.SetErrorStringWithFormat("invalid unsigned string value '%s' for the '%s' setting", value, StopDisassemblyCountName ().GetCString());
-// }
-// else if (var_name == StopDisassemblyDisplayName ())
-// {
-// int new_value;
-// UserSettingsController::UpdateEnumVariable (g_show_disassembly_enum_values, &new_value, value, err);
-// if (err.Success())
-// m_stop_disassembly_display = (StopDisassemblyType)new_value;
-// }
-//}
-//
-//bool
-//DebuggerInstanceSettings::GetInstanceSettingsValue (const SettingEntry &entry,
-// const ConstString &var_name,
-// StringList &value,
-// Error *err)
-//{
-// if (var_name == PromptVarName())
-// {
-// value.AppendString (m_prompt.c_str(), m_prompt.size());
-// }
-// else if (var_name == GetNotifyVoidName())
-// {
-// value.AppendString (m_notify_void ? "true" : "false");
-// }
-// else if (var_name == ScriptLangVarName())
-// {
-// value.AppendString (ScriptInterpreter::LanguageToString (m_script_lang).c_str());
-// }
-// else if (var_name == TermWidthVarName())
-// {
-// StreamString width_str;
-// width_str.Printf ("%u", m_term_width);
-// value.AppendString (width_str.GetData());
-// }
-// else if (var_name == GetFrameFormatName ())
-// {
-// value.AppendString(m_frame_format.c_str(), m_frame_format.size());
-// }
-// else if (var_name == GetThreadFormatName ())
-// {
-// value.AppendString(m_thread_format.c_str(), m_thread_format.size());
-// }
-// else if (var_name == UseExternalEditorVarName())
-// {
-// if (m_use_external_editor)
-// value.AppendString ("true");
-// else
-// value.AppendString ("false");
-// }
-// else if (var_name == AutoConfirmName())
-// {
-// if (m_auto_confirm_on)
-// value.AppendString ("true");
-// else
-// value.AppendString ("false");
-// }
-// else if (var_name == StopSourceContextAfterName ())
-// {
-// StreamString strm;
-// strm.Printf ("%u", m_stop_source_after_count);
-// value.AppendString (strm.GetData());
-// }
-// else if (var_name == StopSourceContextBeforeName ())
-// {
-// StreamString strm;
-// strm.Printf ("%u", m_stop_source_before_count);
-// value.AppendString (strm.GetData());
-// }
-// else if (var_name == StopDisassemblyCountName ())
-// {
-// StreamString strm;
-// strm.Printf ("%u", m_stop_disassembly_count);
-// value.AppendString (strm.GetData());
-// }
-// else if (var_name == StopDisassemblyDisplayName ())
-// {
-// if (m_stop_disassembly_display >= eStopDisassemblyTypeNever && m_stop_disassembly_display <= eStopDisassemblyTypeAlways)
-// value.AppendString (g_show_disassembly_enum_values[m_stop_disassembly_display].string_value);
-// else
-// value.AppendString ("<invalid>");
-// }
-// else
-// {
-// if (err)
-// err->SetErrorStringWithFormat ("unrecognized variable name '%s'", var_name.AsCString());
-// return false;
-// }
-// return true;
-//}
-//
-//void
-//DebuggerInstanceSettings::CopyInstanceSettings (const InstanceSettingsSP &new_settings,
-// bool pending)
-//{
-// if (new_settings.get() == NULL)
-// return;
-//
-// DebuggerInstanceSettings *new_debugger_settings = (DebuggerInstanceSettings *) new_settings.get();
-//
-// m_prompt = new_debugger_settings->m_prompt;
-// if (!pending)
-// {
-// // '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_notify_void = new_debugger_settings->m_notify_void;
-// m_frame_format = new_debugger_settings->m_frame_format;
-// m_thread_format = new_debugger_settings->m_thread_format;
-// m_term_width = new_debugger_settings->m_term_width;
-// m_script_lang = new_debugger_settings->m_script_lang;
-// m_use_external_editor = new_debugger_settings->m_use_external_editor;
-// m_auto_confirm_on = new_debugger_settings->m_auto_confirm_on;
-//}
-//
-//
-//bool
-//DebuggerInstanceSettings::BroadcastPromptChange (const ConstString &instance_name, const char *new_prompt)
-//{
-// std::string tmp_prompt;
-//
-// if (new_prompt != NULL)
-// {
-// tmp_prompt = new_prompt ;
-// int len = tmp_prompt.size();
-// if (len > 1
-// && (tmp_prompt[0] == '\'' || tmp_prompt[0] == '"')
-// && (tmp_prompt[len-1] == tmp_prompt[0]))
-// {
-// tmp_prompt = tmp_prompt.substr(1,len-2);
-// }
-// len = tmp_prompt.size();
-// if (tmp_prompt[len-1] != ' ')
-// tmp_prompt.append(" ");
-// }
-// EventSP new_event_sp;
-// new_event_sp.reset (new Event(CommandInterpreter::eBroadcastBitResetPrompt,
-// new EventDataBytes (tmp_prompt.c_str())));
-//
-// if (instance_name.GetLength() != 0)
-// {
-// // Set prompt for a particular instance.
-// Debugger *dbg = Debugger::FindDebuggerWithInstanceName (instance_name).get();
-// if (dbg != NULL)
-// {
-// dbg->GetCommandInterpreter().BroadcastEvent (new_event_sp);
-// }
-// }
-//
-// return true;
-//}
-//
-//const ConstString
-//DebuggerInstanceSettings::CreateInstanceName ()
-//{
-// static int instance_count = 1;
-// StreamString sstr;
-//
-// sstr.Printf ("debugger_%d", instance_count);
-// ++instance_count;
-//
-// const ConstString ret_val (sstr.GetData());
-//
-// return ret_val;
-//}
-//
-
-//--------------------------------------------------
-// SettingsController Variable Tables
-//--------------------------------------------------
-
-//
-//SettingEntry
-//Debugger::SettingsController::global_settings_table[] =
-//{
-// //{ "var-name", var-type, "default", enum-table, init'd, hidden, "help-text"},
-// // The Debugger level global table should always be empty; all Debugger settable variables should be instance
-// // variables.
-// { NULL, eSetVarTypeNone, NULL, NULL, 0, 0, NULL }
-//};
-
-//SettingEntry
-//Debugger::SettingsController::instance_settings_table[] =
-//{
-//// NAME Setting variable type Default Enum Init'd Hidden Help
-//// ======================= ======================= ====================== ==== ====== ====== ======================
-//{ "frame-format", eSetVarTypeString, DEFAULT_FRAME_FORMAT, NULL, false, false, "The default frame format string to use when displaying thread information." },
-//{ "prompt", eSetVarTypeString, "(lldb) ", NULL, false, false, "The debugger command line prompt displayed for the user." },
-//{ "script-lang", eSetVarTypeString, "python", NULL, false, false, "The script language to be used for evaluating user-written scripts." },
-//{ "term-width", eSetVarTypeInt, "80" , NULL, false, false, "The maximum number of columns to use for displaying text." },
-//{ "thread-format", eSetVarTypeString, DEFAULT_THREAD_FORMAT, NULL, false, false, "The default thread format string to use when displaying thread information." },
-//{ "use-external-editor", eSetVarTypeBoolean, "false", NULL, false, false, "Whether to use an external editor or not." },
-//{ "auto-confirm", eSetVarTypeBoolean, "false", NULL, false, false, "If true all confirmation prompts will receive their default reply." },
-//{ "stop-line-count-before",eSetVarTypeInt, "3", NULL, false, false, "The number of sources lines to display that come before the current source line when displaying a stopped context." },
-//{ "stop-line-count-after", eSetVarTypeInt, "3", NULL, false, false, "The number of sources lines to display that come after the current source line when displaying a stopped context." },
-//{ "stop-disassembly-count", eSetVarTypeInt, "0", NULL, false, false, "The number of disassembly lines to show when displaying a stopped context." },
-//{ "stop-disassembly-display", eSetVarTypeEnum, "no-source", g_show_disassembly_enum_values, false, false, "Control when to display disassembly when displaying a stopped context." },
-//{ NULL, eSetVarTypeNone, NULL, NULL, false, false, NULL }
-//};
OpenPOWER on IntegriCloud