Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit bcdca17

Browse files
committed
Merge pull request #4 from kangaroo/clrstack
Fixes OSx problems.
2 parents 7f238c9 + d6fb741 commit bcdca17

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/ToolBox/SOS/lldbplugin/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if(NOT ENABLE_LLDBPLUGIN)
1818
endif()
1919

2020
# Check for LLDB library
21-
find_library(LLDB NAMES lldb-3.6 lldb-3.5 PATHS "${WITH_LLDB_LIBS}")
21+
find_library(LLDB NAMES lldb-3.6 lldb-3.5 LLDB PATHS "${WITH_LLDB_LIBS}")
2222
if(LLDB STREQUAL LLDB-NOTFOUND)
2323
if(REQUIRE_LLDBPLUGIN)
2424
message(FATAL_ERROR "Cannot find lldb-3.5 or lldb-3.6. Try installing lldb-3.6-dev (or the appropriate package for your platform)")

src/pal/src/include/pal/thread.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,8 +759,14 @@ extern int free_threads_spinlock;
759759
linux we need to use gettid().
760760
761761
--*/
762-
#ifdef __LINUX__
762+
#if defined(__LINUX__)
763763
#define THREADSilentGetCurrentThreadId() (SIZE_T)syscall(SYS_gettid)
764+
#elif defined(__APPLE__)
765+
inline SIZE_T THREADSilentGetCurrentThreadId() {
766+
uint64_t tid;
767+
pthread_threadid_np(pthread_self(), &tid);
768+
return (SIZE_T)tid;
769+
}
764770
#else
765771
#define THREADSilentGetCurrentThreadId() (SIZE_T)pthread_self()
766772
#endif

0 commit comments

Comments
 (0)