summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/windows/HostInfoWindows.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/Host/windows/HostInfoWindows.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/Host/windows/HostInfoWindows.cpp')
-rw-r--r--lldb/source/Host/windows/HostInfoWindows.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/lldb/source/Host/windows/HostInfoWindows.cpp b/lldb/source/Host/windows/HostInfoWindows.cpp
index e0487356a56..f7d7411c08d 100644
--- a/lldb/source/Host/windows/HostInfoWindows.cpp
+++ b/lldb/source/Host/windows/HostInfoWindows.cpp
@@ -15,6 +15,8 @@
using namespace lldb_private;
+FileSpec HostInfoWindows::m_program_filespec;
+
size_t
HostInfoWindows::GetPageSize()
{
@@ -79,6 +81,21 @@ HostInfoWindows::GetHostname(std::string &s)
return true;
}
+FileSpec
+HostInfoWindows::GetProgramFileSpec()
+{
+ static bool is_initialized = false;
+ if (!is_initialized)
+ {
+ is_initialized = true;
+
+ std::vector<char> buffer(PATH_MAX);
+ ::GetModuleFileName(NULL, &buffer[0], buffer.size());
+ m_program_filespec.SetFile(&buffer[0], false);
+ }
+ return m_program_filespec;
+}
+
bool
HostInfoWindows::ComputePythonDirectory(FileSpec &file_spec)
{
OpenPOWER on IntegriCloud