[Lldb-commits] [lldb] r220596 - Implement explicit thread stack size specification on Windows.
Zachary Turner
zturner at google.com
Fri Oct 24 15:06:30 PDT 2014
Author: zturner
Date: Fri Oct 24 17:06:29 2014
New Revision: 220596
URL: http://llvm.org/viewvc/llvm-project?rev=220596&view=rev
Log:
Implement explicit thread stack size specification on Windows.
Modified:
lldb/trunk/source/Core/Debugger.cpp
lldb/trunk/source/Host/common/ThreadLauncher.cpp
Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=220596&r1=220595&r2=220596&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Fri Oct 24 17:06:29 2014
@@ -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();
}
Modified: lldb/trunk/source/Host/common/ThreadLauncher.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/ThreadLauncher.cpp?rev=220596&r1=220595&r2=220596&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/ThreadLauncher.cpp (original)
+++ lldb/trunk/source/Host/common/ThreadLauncher.cpp Fri Oct 24 17:06:29 2014
@@ -32,7 +32,8 @@ ThreadLauncher::LaunchThread(llvm::Strin
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
More information about the lldb-commits
mailing list