summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Core/Debugger.cpp9
-rw-r--r--lldb/source/Host/common/ThreadLauncher.cpp3
2 files changed, 6 insertions, 6 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 506afe27b0e..4948b83c179 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -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();
}
diff --git a/lldb/source/Host/common/ThreadLauncher.cpp b/lldb/source/Host/common/ThreadLauncher.cpp
index d9fe21e1bc5..ec7da325bf9 100644
--- a/lldb/source/Host/common/ThreadLauncher.cpp
+++ b/lldb/source/Host/common/ThreadLauncher.cpp
@@ -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
OpenPOWER on IntegriCloud