Implement explicit thread stack size specification on Windows.
llvm-svn: 220596
This commit is contained in:
parent
4b9d964925
commit
7c2896a234
|
@ -64,6 +64,7 @@ using namespace lldb_private;
|
|||
|
||||
static uint32_t g_shared_debugger_refcount = 0;
|
||||
static lldb::user_id_t g_unique_id = 1;
|
||||
static size_t g_debugger_event_thread_stack_bytes = 8 * 1024 * 1024;
|
||||
|
||||
#pragma mark Static Functions
|
||||
|
||||
|
@ -3322,11 +3323,9 @@ Debugger::StartEventHandlerThread()
|
|||
{
|
||||
if (!m_event_handler_thread.IsJoinable())
|
||||
{
|
||||
m_event_handler_thread = ThreadLauncher::LaunchThread ("lldb.debugger.event-handler",
|
||||
EventHandlerThread,
|
||||
this,
|
||||
NULL,
|
||||
8*1024*1024); // Use larger 8MB stack for this thread
|
||||
// Use larger 8MB stack for this thread
|
||||
m_event_handler_thread = ThreadLauncher::LaunchThread("lldb.debugger.event-handler", EventHandlerThread, this, NULL,
|
||||
g_debugger_event_thread_stack_bytes);
|
||||
}
|
||||
return m_event_handler_thread.IsJoinable();
|
||||
}
|
||||
|
|
|
@ -32,7 +32,8 @@ ThreadLauncher::LaunchThread(llvm::StringRef name, lldb::thread_func_t thread_fu
|
|||
HostThreadCreateInfo *info_ptr = new HostThreadCreateInfo(name.data(), thread_function, thread_arg);
|
||||
lldb::thread_t thread;
|
||||
#ifdef _WIN32
|
||||
thread = (lldb::thread_t)::_beginthreadex(0, 0, HostNativeThread::ThreadCreateTrampoline, info_ptr, 0, NULL);
|
||||
thread =
|
||||
(lldb::thread_t)::_beginthreadex(0, (unsigned)min_stack_byte_size, HostNativeThread::ThreadCreateTrampoline, info_ptr, 0, NULL);
|
||||
if (thread == (lldb::thread_t)(-1L))
|
||||
error.SetError(::GetLastError(), eErrorTypeWin32);
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue