diff options
author | Caroline Tice <ctice@apple.com> | 2010-09-27 00:30:10 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2010-09-27 00:30:10 +0000 |
commit | 1559a46b3eae1f941a67937abfafaf7d12f5ec1c (patch) | |
tree | d1de2061dc9a9fd0dfb0ffd0f8c73a1baa036a02 /lldb/source/Target/Process.cpp | |
parent | c8a4973389b8d6b75c06c02112873e823a82a27b (diff) | |
download | bcm5719-llvm-1559a46b3eae1f941a67937abfafaf7d12f5ec1c.tar.gz bcm5719-llvm-1559a46b3eae1f941a67937abfafaf7d12f5ec1c.zip |
Create more useful instance names for target, process and thread instances.
Change default 'set' behavior so that all instance settings for the specified variable will be
updated, unless the "-n" ("--no_override") command options is specified.
llvm-svn: 114808
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index a12377792d0..646a8e8a807 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -87,6 +87,8 @@ Process::Process(Target &target, Listener &listener) : m_objc_object_printer(*this), m_persistent_vars() { + UpdateInstanceName(); + Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT); if (log) log->Printf ("%p Process::Process()", this); @@ -1884,6 +1886,20 @@ Process::GetSettingsController (bool finish) return g_settings_controller; } +void +Process::UpdateInstanceName () +{ + ModuleSP module_sp = GetTarget().GetExecutableModule(); + if (module_sp) + { + StreamString sstr; + sstr.Printf ("%s", module_sp->GetFileSpec().GetFilename().AsCString()); + + Process::GetSettingsController()->RenameInstanceSettings (GetInstanceName().AsCString(), + sstr.GetData()); + } +} + //-------------------------------------------------------------- // class Process::SettingsController //-------------------------------------------------------------- |