diff options
| author | Zachary Turner <zturner@google.com> | 2014-10-24 22:06:29 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2014-10-24 22:06:29 +0000 |
| commit | 7c2896a234e765c49f885d7689079a97b1651e32 (patch) | |
| tree | 63c940aace2d7ba4b8592430dd8eea97cfcc2c84 | |
| parent | 4b9d964925d3b8c798185c8f66c22d3f11e40537 (diff) | |
| download | bcm5719-llvm-7c2896a234e765c49f885d7689079a97b1651e32.tar.gz bcm5719-llvm-7c2896a234e765c49f885d7689079a97b1651e32.zip | |
Implement explicit thread stack size specification on Windows.
llvm-svn: 220596
| -rw-r--r-- | lldb/source/Core/Debugger.cpp | 9 | ||||
| -rw-r--r-- | lldb/source/Host/common/ThreadLauncher.cpp | 3 |
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 |

