diff options
Diffstat (limited to 'lldb/source/Target/Process.cpp')
| -rw-r--r-- | lldb/source/Target/Process.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index c86b74cc77f..a9f6d55fd79 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -1876,7 +1876,7 @@ Process::ProcessSettingsController::CreateNewInstanceSettings (const char *insta ProcessInstanceSettings::ProcessInstanceSettings (UserSettingsController &owner, bool live_instance, const char *name) : - InstanceSettings (owner, (name == NULL ? CreateInstanceName().AsCString() : name), live_instance), + InstanceSettings (owner, (name == NULL ? InstanceSettings::InvalidName().AsCString() : name), live_instance), m_run_args (), m_env_vars (), m_input_path (), @@ -1888,6 +1888,13 @@ ProcessInstanceSettings::ProcessInstanceSettings (UserSettingsController &owner, // CopyInstanceSettings is a pure virtual function in InstanceSettings; it therefore cannot be called // until the vtables for ProcessInstanceSettings 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())); + m_owner.RegisterInstanceSettings (this); + } if (live_instance) { |

