[Lldb-commits] [lldb] r119784 - in /lldb/trunk: lldb.xcodeproj/project.pbxproj source/Core/Debugger.cpp source/Core/UserSettingsController.cpp source/Target/Process.cpp source/Target/Target.cpp source/Target/Thread.cpp tools/debugserver/debugserver.xcodeproj/project.pbxproj
Greg Clayton
gclayton at apple.com
Thu Nov 18 19:46:01 PST 2010
Author: gclayton
Date: Thu Nov 18 21:46:01 2010
New Revision: 119784
URL: http://llvm.org/viewvc/llvm-project?rev=119784&view=rev
Log:
Fixed an issue where the UserSettingsControllers were being created out of
order and this was causing the target, process and thread trees to not be
available.
Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/Core/Debugger.cpp
lldb/trunk/source/Core/UserSettingsController.cpp
lldb/trunk/source/Target/Process.cpp
lldb/trunk/source/Target/Target.cpp
lldb/trunk/source/Target/Thread.cpp
lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj
Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=119784&r1=119783&r2=119784&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 18 21:46:01 2010
@@ -2942,7 +2942,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- ONLY_ACTIVE_ARCH = NO;
+ ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
VALID_ARCHS = "x86_64 i386";
};
@@ -2979,6 +2979,7 @@
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
INSTALL_PATH = /Developer/usr/bin;
+ ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
PRODUCT_NAME = "darwin-debug";
};
@@ -2993,6 +2994,7 @@
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_MODEL_TUNING = G5;
INSTALL_PATH = /Developer/usr/bin;
+ ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
PRODUCT_NAME = "darwin-debug";
ZERO_LINK = NO;
@@ -3006,6 +3008,7 @@
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
INSTALL_PATH = /Developer/usr/bin;
+ ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
PRODUCT_NAME = "darwin-debug";
};
Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=119784&r1=119783&r2=119784&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Thu Nov 18 21:46:01 2010
@@ -64,12 +64,12 @@
{
if (g_shared_debugger_refcount == 0)
{
- lldb_private::Initialize();
UserSettingsControllerSP &usc = GetSettingsController();
usc.reset (new SettingsController);
UserSettingsController::InitializeSettingsController (usc,
SettingsController::global_settings_table,
SettingsController::instance_settings_table);
+ lldb_private::Initialize();
}
g_shared_debugger_refcount++;
@@ -83,11 +83,11 @@
g_shared_debugger_refcount--;
if (g_shared_debugger_refcount == 0)
{
+ lldb_private::WillTerminate();
+ lldb_private::Terminate();
UserSettingsControllerSP &usc = GetSettingsController();
UserSettingsController::FinalizeSettingsController (usc);
usc.reset();
- lldb_private::WillTerminate();
- lldb_private::Terminate();
}
}
// Clear our master list of debugger objects
@@ -165,7 +165,7 @@
Debugger::Debugger () :
UserID (g_unique_id++),
- DebuggerInstanceSettings (*Debugger::GetSettingsController()),
+ DebuggerInstanceSettings (*GetSettingsController()),
m_input_comm("debugger.input"),
m_input_file (),
m_output_file (),
@@ -1259,7 +1259,7 @@
lldb::InstanceSettingsSP
Debugger::SettingsController::CreateInstanceSettings (const char *instance_name)
{
- DebuggerInstanceSettings *new_settings = new DebuggerInstanceSettings (*Debugger::GetSettingsController(),
+ DebuggerInstanceSettings *new_settings = new DebuggerInstanceSettings (*GetSettingsController(),
false, instance_name);
lldb::InstanceSettingsSP new_settings_sp (new_settings);
return new_settings_sp;
Modified: lldb/trunk/source/Core/UserSettingsController.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/UserSettingsController.cpp?rev=119784&r1=119783&r2=119784&view=diff
==============================================================================
--- lldb/trunk/source/Core/UserSettingsController.cpp (original)
+++ lldb/trunk/source/Core/UserSettingsController.cpp Thu Nov 18 21:46:01 2010
@@ -71,7 +71,7 @@
{
const lldb::UserSettingsControllerSP &parent = controller_sp->GetParent ();
if (parent)
- parent->RegisterChild (controller_sp);
+ parent->RegisterChild (controller_sp);
controller_sp->CreateSettingsVector (global_settings, true);
controller_sp->CreateSettingsVector (instance_settings, false);
Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=119784&r1=119783&r2=119784&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Thu Nov 18 21:46:01 2010
@@ -70,7 +70,7 @@
Process::Process(Target &target, Listener &listener) :
UserID (LLDB_INVALID_PROCESS_ID),
Broadcaster ("lldb.process"),
- ProcessInstanceSettings (*(Process::GetSettingsController().get())),
+ ProcessInstanceSettings (*GetSettingsController()),
m_target (target),
m_public_state (eStateUnloaded),
m_private_state (eStateUnloaded),
@@ -2272,7 +2272,7 @@
StreamString sstr;
sstr.Printf ("%s", module_sp->GetFileSpec().GetFilename().AsCString());
- Process::GetSettingsController()->RenameInstanceSettings (GetInstanceName().AsCString(),
+ GetSettingsController()->RenameInstanceSettings (GetInstanceName().AsCString(),
sstr.GetData());
}
}
@@ -2295,8 +2295,9 @@
lldb::InstanceSettingsSP
Process::SettingsController::CreateInstanceSettings (const char *instance_name)
{
- ProcessInstanceSettings *new_settings = new ProcessInstanceSettings (*(Process::GetSettingsController().get()),
- false, instance_name);
+ ProcessInstanceSettings *new_settings = new ProcessInstanceSettings (*GetSettingsController(),
+ false,
+ instance_name);
lldb::InstanceSettingsSP new_settings_sp (new_settings);
return new_settings_sp;
}
@@ -2336,7 +2337,7 @@
}
ProcessInstanceSettings::ProcessInstanceSettings (const ProcessInstanceSettings &rhs) :
- InstanceSettings (*(Process::GetSettingsController().get()), CreateInstanceName().AsCString()),
+ InstanceSettings (*Process::GetSettingsController(), CreateInstanceName().AsCString()),
m_run_args (rhs.m_run_args),
m_env_vars (rhs.m_env_vars),
m_input_path (rhs.m_input_path),
Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=119784&r1=119783&r2=119784&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Thu Nov 18 21:46:01 2010
@@ -36,7 +36,7 @@
//----------------------------------------------------------------------
Target::Target(Debugger &debugger) :
Broadcaster("lldb.target"),
- TargetInstanceSettings (*(Target::GetSettingsController().get())),
+ TargetInstanceSettings (*GetSettingsController()),
m_debugger (debugger),
m_images(),
m_section_load_list (),
@@ -797,7 +797,7 @@
ArchSpec
Target::GetDefaultArchitecture ()
{
- lldb::UserSettingsControllerSP settings_controller = Target::GetSettingsController();
+ lldb::UserSettingsControllerSP &settings_controller = GetSettingsController();
lldb::SettableVariableType var_type;
Error err;
StringList result = settings_controller->GetVariable ("target.default-arch", var_type, "[]", err);
@@ -814,8 +814,11 @@
Target::SetDefaultArchitecture (ArchSpec new_arch)
{
if (new_arch.IsValid())
- Target::GetSettingsController ()->SetVariable ("target.default-arch", new_arch.AsCString(),
- lldb::eVarSetOperationAssign, false, "[]");
+ GetSettingsController ()->SetVariable ("target.default-arch",
+ new_arch.AsCString(),
+ lldb::eVarSetOperationAssign,
+ false,
+ "[]");
}
Target *
@@ -848,8 +851,8 @@
sstr.Printf ("%s_%s",
module_sp->GetFileSpec().GetFilename().AsCString(),
module_sp->GetArchitecture().AsCString());
- Target::GetSettingsController()->RenameInstanceSettings (GetInstanceName().AsCString(),
- sstr.GetData());
+ GetSettingsController()->RenameInstanceSettings (GetInstanceName().AsCString(),
+ sstr.GetData());
}
}
@@ -878,8 +881,9 @@
lldb::InstanceSettingsSP
Target::SettingsController::CreateInstanceSettings (const char *instance_name)
{
- TargetInstanceSettings *new_settings = new TargetInstanceSettings (*(Target::GetSettingsController().get()),
- false, instance_name);
+ TargetInstanceSettings *new_settings = new TargetInstanceSettings (*GetSettingsController(),
+ false,
+ instance_name);
lldb::InstanceSettingsSP new_settings_sp (new_settings);
return new_settings_sp;
}
@@ -958,7 +962,7 @@
}
TargetInstanceSettings::TargetInstanceSettings (const TargetInstanceSettings &rhs) :
- InstanceSettings (*(Target::GetSettingsController().get()), CreateInstanceName().AsCString())
+ InstanceSettings (*Target::GetSettingsController(), CreateInstanceName().AsCString())
{
if (m_instance_name != InstanceSettings::GetDefaultName())
{
Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=119784&r1=119783&r2=119784&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Thu Nov 18 21:46:01 2010
@@ -42,7 +42,7 @@
Thread::Thread (Process &process, lldb::tid_t tid) :
UserID (tid),
- ThreadInstanceSettings (*(Thread::GetSettingsController().get())),
+ ThreadInstanceSettings (*GetSettingsController()),
m_process (process),
m_actual_stop_info_sp (),
m_index_id (process.GetNextThreadIndexID ()),
@@ -1032,8 +1032,9 @@
lldb::InstanceSettingsSP
Thread::SettingsController::CreateInstanceSettings (const char *instance_name)
{
- ThreadInstanceSettings *new_settings = new ThreadInstanceSettings (*(Thread::GetSettingsController().get()),
- false, instance_name);
+ ThreadInstanceSettings *new_settings = new ThreadInstanceSettings (*GetSettingsController(),
+ false,
+ instance_name);
lldb::InstanceSettingsSP new_settings_sp (new_settings);
return new_settings_sp;
}
@@ -1068,7 +1069,7 @@
}
ThreadInstanceSettings::ThreadInstanceSettings (const ThreadInstanceSettings &rhs) :
- InstanceSettings (*(Thread::GetSettingsController().get()), CreateInstanceName().AsCString()),
+ InstanceSettings (*Thread::GetSettingsController(), CreateInstanceName().AsCString()),
m_avoid_regexp_ap (),
m_trace_enabled (rhs.m_trace_enabled)
{
Modified: lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj?rev=119784&r1=119783&r2=119784&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj Thu Nov 18 21:46:01 2010
@@ -372,6 +372,7 @@
isa = PBXProject;
buildConfigurationList = 1DEB914E08733D8E0010E9CD /* Build configuration list for PBXProject "debugserver" */;
compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
More information about the lldb-commits
mailing list