diff options
author | emaste <emaste@FreeBSD.org> | 2014-11-26 16:48:12 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2014-11-26 16:48:12 +0000 |
commit | 0147dda7de9580d13778ecb4c9e92b83b7a63911 (patch) | |
tree | b16dc95f693ed59342b6141cd3fd9f59a6cd7e7e /contrib/llvm/tools/lldb/source/API/SBHostOS.cpp | |
parent | bfd4c39c61ae9b29542625bb12b6f7f4b1f8c727 (diff) | |
parent | 01ee1789d6aa7294e5966a97f8d29387f6f81699 (diff) | |
download | FreeBSD-src-0147dda7de9580d13778ecb4c9e92b83b7a63911.zip FreeBSD-src-0147dda7de9580d13778ecb4c9e92b83b7a63911.tar.gz |
Update LLDB snapshot to upstream r216948 (git 50f7fe44)
This is approximately "LLDB 3.5" although with a little bit of skew,
and will go along with the Clang 3.5 import.
Sponsored by: DARPA, AFRL
Diffstat (limited to 'contrib/llvm/tools/lldb/source/API/SBHostOS.cpp')
-rw-r--r-- | contrib/llvm/tools/lldb/source/API/SBHostOS.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/contrib/llvm/tools/lldb/source/API/SBHostOS.cpp b/contrib/llvm/tools/lldb/source/API/SBHostOS.cpp index 1664031..ec1e2f2 100644 --- a/contrib/llvm/tools/lldb/source/API/SBHostOS.cpp +++ b/contrib/llvm/tools/lldb/source/API/SBHostOS.cpp @@ -12,6 +12,7 @@ #include "lldb/Host/FileSpec.h" #include "lldb/Core/Log.h" #include "lldb/Host/Host.h" +#include "lldb/Host/HostInfo.h" using namespace lldb; using namespace lldb_private; @@ -22,7 +23,7 @@ SBFileSpec SBHostOS::GetProgramFileSpec () { SBFileSpec sb_filespec; - sb_filespec.SetFileSpec (Host::GetProgramFileSpec ()); + sb_filespec.SetFileSpec(HostInfo::GetProgramFileSpec()); return sb_filespec; } @@ -31,18 +32,29 @@ SBHostOS::GetLLDBPythonPath () { SBFileSpec sb_lldb_python_filespec; FileSpec lldb_python_spec; - if (Host::GetLLDBPath (ePathTypePythonDir, lldb_python_spec)) + if (HostInfo::GetLLDBPath(ePathTypePythonDir, lldb_python_spec)) { sb_lldb_python_filespec.SetFileSpec (lldb_python_spec); } return sb_lldb_python_filespec; } + +SBFileSpec +SBHostOS::GetLLDBPath (lldb::PathType path_type) +{ + SBFileSpec sb_fspec; + FileSpec fspec; + if (HostInfo::GetLLDBPath(path_type, fspec)) + sb_fspec.SetFileSpec (fspec); + return sb_fspec; +} + lldb::thread_t SBHostOS::ThreadCreate ( const char *name, - thread_func_t thread_function, + lldb::thread_func_t thread_function, void *thread_arg, SBError *error_ptr ) @@ -50,8 +62,10 @@ SBHostOS::ThreadCreate Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBHostOS::ThreadCreate (name=\"%s\", thread_function=%p, thread_arg=%p, error_ptr=%p)", name, - thread_function, thread_arg, error_ptr); + log->Printf ("SBHostOS::ThreadCreate (name=\"%s\", thread_function=%p, thread_arg=%p, error_ptr=%p)", + name, reinterpret_cast<void*>(reinterpret_cast<intptr_t>(thread_function)), + static_cast<void*>(thread_arg), + static_cast<void*>(error_ptr)); // FIXME: You should log the return value? @@ -77,7 +91,7 @@ SBHostOS::ThreadDetach (lldb::thread_t thread, SBError *error_ptr) } bool -SBHostOS::ThreadJoin (lldb::thread_t thread, thread_result_t *result, SBError *error_ptr) +SBHostOS::ThreadJoin (lldb::thread_t thread, lldb::thread_result_t *result, SBError *error_ptr) { return Host::ThreadJoin (thread, result, error_ptr ? error_ptr->get() : NULL); } |