diff options
| author | Zachary Turner <zturner@google.com> | 2017-03-04 16:42:25 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2017-03-04 16:42:25 +0000 |
| commit | 777de779565c63ee09606ab89233f28259f79f72 (patch) | |
| tree | 9a1a53f53e1de97ba53eb45767c7b64bea8529f3 /lldb/source/Target/Process.cpp | |
| parent | f0236fd49009d34c814ab30348ce6278c51056a7 (diff) | |
| download | bcm5719-llvm-777de779565c63ee09606ab89233f28259f79f72.tar.gz bcm5719-llvm-777de779565c63ee09606ab89233f28259f79f72.zip | |
Truncate thread names if they're too long.
llvm-svn: 296972
Diffstat (limited to 'lldb/source/Target/Process.cpp')
| -rw-r--r-- | lldb/source/Target/Process.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 2f0bb94ed3b..d0651e6bda7 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -14,6 +14,8 @@ // Other libraries and framework includes #include "llvm/Support/ScopedPrinter.h" +#include "llvm/Support/Threading.h" + // Project includes #include "Plugins/Process/Utility/InferiorCallPOSIX.h" #include "lldb/Breakpoint/BreakpointLocation.h" @@ -3733,8 +3735,8 @@ bool Process::StartPrivateStateThread(bool is_secondary_thread) { // Create a thread that watches our internal state and controls which // events make it to clients (into the DCProcess event queue). char thread_name[1024]; - - if (HostInfo::GetMaxThreadNameLength() <= 30) { + uint32_t max_len = llvm::get_max_thread_name_length(); + if (max_len > 0 && max_len <= 30) { // On platforms with abbreviated thread name lengths, choose thread names // that fit within the limit. if (already_running) |

