diff options
author | Caroline Tice <ctice@apple.com> | 2011-03-10 22:14:10 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2011-03-10 22:14:10 +0000 |
commit | 20bd37f747e84c5702d96f08490e1ccb48ab8ce1 (patch) | |
tree | 267a00857860c043aaf581fbbc0d2dd0b5e5f4c7 /lldb/source/Target/Thread.cpp | |
parent | 15bc34c7c215ff05a8c51a679ea19cb28cd91d1a (diff) | |
download | bcm5719-llvm-20bd37f747e84c5702d96f08490e1ccb48ab8ce1.tar.gz bcm5719-llvm-20bd37f747e84c5702d96f08490e1ccb48ab8ce1.zip |
The UserSettings controllers must be initialized & terminated in the
correct order. Previously this was tacitly implemented but not
enforced, so it was possible to accidentally do things in the wrong
order and cause problems. This fixes that problem.
llvm-svn: 127430
Diffstat (limited to 'lldb/source/Target/Thread.cpp')
-rw-r--r-- | lldb/source/Target/Thread.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index af2de6beb72..6c1dc40a7b7 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -1006,18 +1006,26 @@ Thread::GetSP () void -Thread::Initialize () +Thread::SettingsInitialize () { UserSettingsControllerSP &usc = GetSettingsController(); usc.reset (new SettingsController); UserSettingsController::InitializeSettingsController (usc, SettingsController::global_settings_table, SettingsController::instance_settings_table); + + // Now call SettingsInitialize() on each 'child' setting of Thread. + // Currently there are none. } void -Thread::Terminate () +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(); |