diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
| commit | f73363f1dd94996356cefbf24388f561891acf0b (patch) | |
| tree | e3c31248bdb36eaec5fd833490d4278162dba2a0 /source/Host/netbsd/Host.cpp | |
| parent | 160ee69dd7ae18978f4068116777639ea98dc951 (diff) | |
Notes
Diffstat (limited to 'source/Host/netbsd/Host.cpp')
| -rw-r--r-- | source/Host/netbsd/Host.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/source/Host/netbsd/Host.cpp b/source/Host/netbsd/Host.cpp index d927f95f0675..bfd5a74ffcc2 100644 --- a/source/Host/netbsd/Host.cpp +++ b/source/Host/netbsd/Host.cpp @@ -25,12 +25,9 @@ // C++ Includes // Other libraries and framework includes // Project includes -#include "lldb/Core/Module.h" #include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" -#include "lldb/Target/Platform.h" #include "lldb/Target/Process.h" -#include "lldb/Utility/CleanUp.h" #include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/Endian.h" @@ -48,14 +45,7 @@ extern char **environ; using namespace lldb; using namespace lldb_private; -size_t Host::GetEnvironment(StringList &env) { - char **host_env = environ; - char *env_entry; - size_t i; - for (i = 0; (env_entry = host_env[i]) != NULL; ++i) - env.AppendString(env_entry); - return i; -} +Environment Host::GetEnvironment() { return Environment(environ); } static bool GetNetBSDProcessArgs(const ProcessInstanceInfoMatch *match_info_ptr, ProcessInstanceInfo &process_info) { @@ -80,7 +70,8 @@ static bool GetNetBSDProcessArgs(const ProcessInstanceInfoMatch *match_info_ptr, if (!cstr) return false; - process_info.GetExecutableFile().SetFile(cstr, false); + process_info.GetExecutableFile().SetFile(cstr, false, + FileSpec::Style::native); if (!(match_info_ptr == NULL || NameMatches(process_info.GetExecutableFile().GetFilename().GetCString(), @@ -202,9 +193,8 @@ uint32_t Host::FindProcesses(const ProcessInstanceInfoMatch &match_info, continue; // Every thread is a process in NetBSD, but all the threads of a single - // process have the same pid. Do not store the process info in the - // result list if a process with given identifier is already registered - // there. + // process have the same pid. Do not store the process info in the result + // list if a process with given identifier is already registered there. if (proc_kinfo[i].p_nlwps > 1) { bool already_registered = false; for (size_t pi = 0; pi < process_infos.GetSize(); pi++) { |
