summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-08-21 21:49:24 +0000
committerZachary Turner <zturner@google.com>2014-08-21 21:49:24 +0000
commita21fee0ee403731a198926ce63e7b6958419f53a (patch)
tree7de00cd5a04f230f140ccedb67a9ba34e346e351 /lldb/source/Interpreter/CommandInterpreter.cpp
parent6b36337c0913fc5fdb4e73678d63248bd89ff5f0 (diff)
downloadbcm5719-llvm-a21fee0ee403731a198926ce63e7b6958419f53a.tar.gz
bcm5719-llvm-a21fee0ee403731a198926ce63e7b6958419f53a.zip
Move the rest of the HostInfo functions over.
This should bring HostInfo up to 99% completion. The remainder of code in Host will be split into instantiatable classes representing host processes, threads, dynamic libraries, and process launching strategies. llvm-svn: 216230
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 11ae7a50274..56c8f8c0ad6 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -51,6 +51,7 @@
#include "lldb/Host/Editline.h"
#include "lldb/Host/Host.h"
+#include "lldb/Host/HostInfo.h"
#include "lldb/Interpreter/Args.h"
#include "lldb/Interpreter/CommandCompletions.h"
@@ -67,7 +68,9 @@
#include "lldb/Utility/CleanUp.h"
+#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/STLExtras.h"
+#include "llvm/Support/Path.h"
using namespace lldb;
using namespace lldb_private;
@@ -2381,13 +2384,15 @@ CommandInterpreter::SourceInitFile (bool in_cwd, CommandReturnObject &result)
// "-" and the name of the program. If this file doesn't exist, we fall
// back to just the "~/.lldbinit" file. We also obey any requests to not
// load the init files.
- FileSpec profilePath = Host::GetUserProfileFileSpec();
+ llvm::SmallString<64> home_dir_path;
+ llvm::sys::path::home_directory(home_dir_path);
+ FileSpec profilePath(home_dir_path.c_str(), false);
profilePath.AppendPathComponent(".lldbinit");
std::string init_file_path = profilePath.GetPath();
if (m_skip_app_init_files == false)
{
- FileSpec program_file_spec (Host::GetProgramFileSpec());
+ FileSpec program_file_spec(HostInfo::GetProgramFileSpec());
const char *program_name = program_file_spec.GetFilename().AsCString();
if (program_name)
OpenPOWER on IntegriCloud