diff options
author | Enrico Granata <egranata@apple.com> | 2012-07-16 23:10:35 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2012-07-16 23:10:35 +0000 |
commit | 3372f581eb8bb97fddc316c79f48808ca3db245d (patch) | |
tree | bed6ebb41ff318888ebe58194e228821e486c9dc /lldb/source/Target/Process.cpp | |
parent | 482fb19fd52d2f1c3817d475bbe7d7df532fe1c4 (diff) | |
download | bcm5719-llvm-3372f581eb8bb97fddc316c79f48808ca3db245d.tar.gz bcm5719-llvm-3372f581eb8bb97fddc316c79f48808ca3db245d.zip |
<rdar://problem/11672978> Fixing an issue where an ObjC object might come out without a description because the expression used to obtain it would timeout before running to completion
llvm-svn: 160326
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 531b56c503e..61da768995e 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -4228,11 +4228,27 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx, if (single_thread_timeout_usec != 0) { + // we have a > 0 timeout, let us set it so that we stop after the deadline real_timeout = TimeValue::Now(); real_timeout.OffsetWithMicroSeconds(single_thread_timeout_usec); timeout_ptr = &real_timeout; } + else if (first_timeout) + { + // if we are willing to wait "forever" we still need to have an initial timeout + // this timeout is going to induce all threads to run when hit. we do this so that + // we can avoid ending locked up because of multithreaded contention issues + real_timeout = TimeValue::Now(); + real_timeout.OffsetWithNanoSeconds(500000000UL); + timeout_ptr = &real_timeout; + } + else + { + timeout_ptr = NULL; // if we are in a no-timeout scenario, then we only need a fake timeout the first time through + // at this point in the code, all threads will be running so we are willing to wait forever, and do not + // need a timeout + } } else { |