summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2011-01-23 21:14:08 +0000
committerJim Ingham <jingham@apple.com>2011-01-23 21:14:08 +0000
commit1e7a9ee7d0f1ca59f624ce87fedcff93d98f8f80 (patch)
tree0eb2d552a4a8df7efaed2e3cccead3c55f46d5f1 /lldb/source/Target/Process.cpp
parent19588aa40b8b1350c5df95ba4cb94b035a3c46ca (diff)
downloadbcm5719-llvm-1e7a9ee7d0f1ca59f624ce87fedcff93d98f8f80.tar.gz
bcm5719-llvm-1e7a9ee7d0f1ca59f624ce87fedcff93d98f8f80.zip
Add some more logging of broadcaster and Process. Also, protect the event broadcasting against hijacking in mid-event delivery.
llvm-svn: 124084
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index c7d511e4887..aa0170ca836 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -2627,15 +2627,15 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
exe_ctx.thread->QueueThreadPlan(thread_plan_sp, true);
- Listener listener("ClangFunction temporary listener");
+ Listener listener("lldb.process.listener.run-thread-plan");
exe_ctx.process->HijackProcessEvents(&listener);
- lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
+ lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP | LIBLLDB_LOG_PROCESS));
if (log)
{
StreamString s;
thread_plan_sp->GetDescription(&s, lldb::eDescriptionLevelVerbose);
- log->Printf ("Resuming thread 0x%x to run thread plan \"%s\".", tid, s.GetData());
+ log->Printf ("Resuming thread %u - 0x%4.4x to run thread plan \"%s\".", exe_ctx.thread->GetIndexID(), exe_ctx.thread->GetID(), s.GetData());
}
Error resume_error = exe_ctx.process->Resume ();
@@ -2738,14 +2738,15 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
if (log)
log->Printf ("Halt failed: \"%s\", I'm just going to wait a little longer and see if the world gets nicer to me.",
halt_error.AsCString());
+ abort();
- if (single_thread_timeout_usec != 0)
- {
- real_timeout = TimeValue::Now();
- real_timeout.OffsetWithMicroSeconds(single_thread_timeout_usec);
- timeout_ptr = &real_timeout;
- }
- continue;
+ if (single_thread_timeout_usec != 0)
+ {
+ real_timeout = TimeValue::Now();
+ real_timeout.OffsetWithMicroSeconds(single_thread_timeout_usec);
+ timeout_ptr = &real_timeout;
+ }
+ continue;
}
}
OpenPOWER on IntegriCloud