summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 10a290be54c..0811822ff14 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -2095,16 +2095,14 @@ void CommandInterpreter::SourceInitFile(bool in_cwd,
CommandReturnObject &result) {
FileSpec init_file;
if (in_cwd) {
- ExecutionContext exe_ctx(GetExecutionContext());
- Target *target = exe_ctx.GetTargetPtr();
- if (target) {
+ lldb::TargetPropertiesSP properties = Target::GetGlobalProperties();
+ if (properties) {
// In the current working directory we don't load any program specific
// .lldbinit files, we only look for a ".lldbinit" file.
if (m_skip_lldbinit_files)
return;
- LoadCWDlldbinitFile should_load =
- target->TargetProperties::GetLoadCWDlldbinitFile();
+ LoadCWDlldbinitFile should_load = properties->GetLoadCWDlldbinitFile();
if (should_load == eLoadCWDlldbinitWarn) {
FileSpec dot_lldb(".lldbinit");
FileSystem::Instance().Resolve(dot_lldb);
OpenPOWER on IntegriCloud