diff options
author | Greg Clayton <gclayton@apple.com> | 2012-08-22 18:39:03 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-08-22 18:39:03 +0000 |
commit | 6920b52be6f8731692a9bff4fe6a7b596cda00c5 (patch) | |
tree | 48998e76a15a5165a7ca5f6eecb90a08a88dfadb /lldb/source/Target/Thread.cpp | |
parent | 6f0bf8049a4dc08afaba8bfd6bb9a1cd4c77e1b7 (diff) | |
download | bcm5719-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/Target/Thread.cpp')
-rw-r--r-- | lldb/source/Target/Thread.cpp | 283 |
1 files changed, 2 insertions, 281 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index e120153be19..df86869cc33 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -79,7 +79,7 @@ public: // is part of a new lldb_private::Thread instance. It will copy all current // global property values as needed ThreadOptionValueProperties (ThreadProperties *global_properties) : - OptionValueProperties(*global_properties->GetValueProperties()) + OptionValueProperties(*global_properties->GetValueProperties()) { } @@ -139,7 +139,6 @@ ThreadProperties::GetTraceEnabledState() const Thread::Thread (const ProcessSP &process_sp, lldb::tid_t tid) : ThreadProperties (false), UserID (tid), -//ThreadInstanceSettings (GetSettingsController()), m_process_wp (process_sp), m_actual_stop_info_sp (), m_index_id (process_sp->GetNextThreadIndexID ()), @@ -164,7 +163,6 @@ Thread::Thread (const ProcessSP &process_sp, lldb::tid_t tid) : log->Printf ("%p Thread::Thread(tid = 0x%4.4llx)", this, GetID()); QueueFundamentalPlan(true); - //UpdateInstanceName(); } @@ -1290,61 +1288,12 @@ Thread::DumpUsingSettingsFormat (Stream &strm, uint32_t frame_idx) void Thread::SettingsInitialize () { -// UserSettingsController::InitializeSettingsController (GetSettingsController(), -// SettingsController::global_settings_table, -// SettingsController::instance_settings_table); -// - // Now call SettingsInitialize() on each 'child' setting of Thread. - // Currently there are none. } void Thread::SettingsTerminate () { - // Must call SettingsTerminate() on each 'child' setting of Thread before terminating Thread settings. - // Currently there are none. - - // Now terminate Thread Settings. -// -// UserSettingsControllerSP &usc = GetSettingsController(); -// UserSettingsController::FinalizeSettingsController (usc); -// usc.reset(); -} - -//UserSettingsControllerSP & -//Thread::GetSettingsController () -//{ -// static UserSettingsControllerSP g_settings_controller_sp; -// if (!g_settings_controller_sp) -// { -// g_settings_controller_sp.reset (new Thread::SettingsController); -// // The first shared pointer to Target::SettingsController in -// // g_settings_controller_sp must be fully created above so that -// // the TargetInstanceSettings can use a weak_ptr to refer back -// // to the master setttings controller -// InstanceSettingsSP default_instance_settings_sp (new ThreadInstanceSettings (g_settings_controller_sp, -// false, -// InstanceSettings::GetDefaultName().AsCString())); -// -// g_settings_controller_sp->SetDefaultInstanceSettings (default_instance_settings_sp); -// } -// return g_settings_controller_sp; -//} - -//void -//Thread::UpdateInstanceName () -//{ -// StreamString sstr; -// const char *name = GetName(); -// -// if (name && name[0] != '\0') -// sstr.Printf ("%s", name); -// else if ((GetIndexID() != 0) || (GetID() != 0)) -// sstr.Printf ("0x%4.4x", GetIndexID()); -// -// if (sstr.GetSize() > 0) -// Thread::GetSettingsController()->RenameInstanceSettings (GetInstanceName().AsCString(), sstr.GetData()); -//} +} lldb::StackFrameSP Thread::GetStackFrameSPForStackFramePtr (StackFrame *stack_frame_ptr) @@ -1510,231 +1459,3 @@ Thread::Flush () ClearStackFrames (); m_reg_context_sp.reset(); } - - -#pragma mark "Thread::SettingsController" -//-------------------------------------------------------------- -// class Thread::SettingsController -//-------------------------------------------------------------- -// -//Thread::SettingsController::SettingsController () : -// UserSettingsController ("thread", Process::GetSettingsController()) -//{ -//} -// -//Thread::SettingsController::~SettingsController () -//{ -//} -// -//lldb::InstanceSettingsSP -//Thread::SettingsController::CreateInstanceSettings (const char *instance_name) -//{ -// lldb::InstanceSettingsSP new_settings_sp (new ThreadInstanceSettings (GetSettingsController(), -// false, -// instance_name)); -// return new_settings_sp; -//} - -//#pragma mark "ThreadInstanceSettings" -////-------------------------------------------------------------- -//// class ThreadInstanceSettings -////-------------------------------------------------------------- -// -//ThreadInstanceSettings::ThreadInstanceSettings (const UserSettingsControllerSP &owner_sp, bool live_instance, const char *name) : -// InstanceSettings (owner_sp, name ? name : InstanceSettings::InvalidName().AsCString(), live_instance), -// m_avoid_regexp_ap (), -// m_trace_enabled (false) -//{ -// // CopyInstanceSettings is a pure virtual function in InstanceSettings; it therefore cannot be called -// // until the vtables for ThreadInstanceSettings 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. -// // This is true for CreateInstanceName() too. -// -// if (GetInstanceName() == InstanceSettings::InvalidName()) -// { -// ChangeInstanceName (std::string (CreateInstanceName().AsCString())); -// owner_sp->RegisterInstanceSettings (this); -// } -// -// if (live_instance) -// { -// CopyInstanceSettings (owner_sp->FindPendingSettings (m_instance_name),false); -// } -//} -// -//ThreadInstanceSettings::ThreadInstanceSettings (const ThreadInstanceSettings &rhs) : -// InstanceSettings (Thread::GetSettingsController(), CreateInstanceName().AsCString()), -// m_avoid_regexp_ap (), -// m_trace_enabled (rhs.m_trace_enabled) -//{ -// if (m_instance_name != InstanceSettings::GetDefaultName()) -// { -// UserSettingsControllerSP owner_sp (m_owner_wp.lock()); -// if (owner_sp) -// { -// CopyInstanceSettings (owner_sp->FindPendingSettings (m_instance_name), false); -// owner_sp->RemovePendingSettings (m_instance_name); -// } -// } -// if (rhs.m_avoid_regexp_ap.get() != NULL) -// m_avoid_regexp_ap.reset(new RegularExpression(rhs.m_avoid_regexp_ap->GetText())); -//} -// -//ThreadInstanceSettings::~ThreadInstanceSettings () -//{ -//} -// -//ThreadInstanceSettings& -//ThreadInstanceSettings::operator= (const ThreadInstanceSettings &rhs) -//{ -// if (this != &rhs) -// { -// if (rhs.m_avoid_regexp_ap.get() != NULL) -// m_avoid_regexp_ap.reset(new RegularExpression(rhs.m_avoid_regexp_ap->GetText())); -// else -// m_avoid_regexp_ap.reset(NULL); -// } -// m_trace_enabled = rhs.m_trace_enabled; -// return *this; -//} -// -// -//void -//ThreadInstanceSettings::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 == StepAvoidRegexpVarName()) -// { -// std::string regexp_text; -// if (m_avoid_regexp_ap.get() != NULL) -// regexp_text.append (m_avoid_regexp_ap->GetText()); -// UserSettingsController::UpdateStringVariable (op, regexp_text, value, err); -// if (regexp_text.empty()) -// m_avoid_regexp_ap.reset(); -// else -// { -// m_avoid_regexp_ap.reset(new RegularExpression(regexp_text.c_str())); -// -// } -// } -// else if (var_name == GetTraceThreadVarName()) -// { -// bool success; -// bool result = Args::StringToBoolean(value, false, &success); -// -// if (success) -// { -// m_trace_enabled = result; -// if (!pending) -// { -// Thread *myself = static_cast<Thread *> (this); -// myself->EnableTracer(m_trace_enabled, true); -// } -// } -// else -// { -// err.SetErrorStringWithFormat ("Bad value \"%s\" for trace-thread, should be Boolean.", value); -// } -// -// } -//} -// -//void -//ThreadInstanceSettings::CopyInstanceSettings (const lldb::InstanceSettingsSP &new_settings, -// bool pending) -//{ -// if (new_settings.get() == NULL) -// return; -// -// ThreadInstanceSettings *new_process_settings = (ThreadInstanceSettings *) new_settings.get(); -// if (new_process_settings->GetSymbolsToAvoidRegexp() != NULL) -// m_avoid_regexp_ap.reset (new RegularExpression (new_process_settings->GetSymbolsToAvoidRegexp()->GetText())); -// else -// m_avoid_regexp_ap.reset (); -//} -// -//bool -//ThreadInstanceSettings::GetInstanceSettingsValue (const SettingEntry &entry, -// const ConstString &var_name, -// StringList &value, -// Error *err) -//{ -// if (var_name == StepAvoidRegexpVarName()) -// { -// if (m_avoid_regexp_ap.get() != NULL) -// { -// std::string regexp_text("\""); -// regexp_text.append(m_avoid_regexp_ap->GetText()); -// regexp_text.append ("\""); -// value.AppendString (regexp_text.c_str()); -// } -// -// } -// else if (var_name == GetTraceThreadVarName()) -// { -// value.AppendString(m_trace_enabled ? "true" : "false"); -// } -// else -// { -// if (err) -// err->SetErrorStringWithFormat ("unrecognized variable name '%s'", var_name.AsCString()); -// return false; -// } -// return true; -//} -// -//const ConstString -//ThreadInstanceSettings::CreateInstanceName () -//{ -// static int instance_count = 1; -// StreamString sstr; -// -// sstr.Printf ("thread_%d", instance_count); -// ++instance_count; -// -// const ConstString ret_val (sstr.GetData()); -// return ret_val; -//} -// -//const ConstString & -//ThreadInstanceSettings::StepAvoidRegexpVarName () -//{ -// static ConstString step_avoid_var_name ("step-avoid-regexp"); -// -// return step_avoid_var_name; -//} -// -//const ConstString & -//ThreadInstanceSettings::GetTraceThreadVarName () -//{ -// static ConstString trace_thread_var_name ("trace-thread"); -// -// return trace_thread_var_name; -//} -// -//-------------------------------------------------- -// SettingsController Variable Tables -//-------------------------------------------------- -// -//SettingEntry -//Thread::SettingsController::global_settings_table[] = -//{ -// //{ "var-name", var-type , "default", enum-table, init'd, hidden, "help-text"}, -// { NULL, eSetVarTypeNone, NULL, NULL, 0, 0, NULL } -//}; -// -// -//SettingEntry -//Thread::SettingsController::instance_settings_table[] = -//{ -// //{ "var-name", var-type, "default", enum-table, init'd, hidden, "help-text"}, -// { "step-avoid-regexp", eSetVarTypeString, "", NULL, false, false, "A regular expression defining functions step-in won't stop in." }, -// { "trace-thread", eSetVarTypeBoolean, "false", NULL, false, false, "If true, this thread will single-step and log execution." }, -// { NULL, eSetVarTypeNone, NULL, NULL, 0, 0, NULL } -//}; |