summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadPlanBase.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2011-02-08 05:20:59 +0000
committerJim Ingham <jingham@apple.com>2011-02-08 05:20:59 +0000
commit0f16e73a76503fb252f36b90c2e1a7901ab6a9a4 (patch)
tree07ebe5ee9d4bc518a0b77af967d572b3aa1a4f57 /lldb/source/Target/ThreadPlanBase.cpp
parent87e5ff02a1248cf18c8ca7430df0ab7d55643e00 (diff)
downloadbcm5719-llvm-0f16e73a76503fb252f36b90c2e1a7901ab6a9a4.tar.gz
bcm5719-llvm-0f16e73a76503fb252f36b90c2e1a7901ab6a9a4.zip
Rework the RunThreadPlan event handling to use Event Hijacking not stopping the event thread. Also clarify the logic of the function.
llvm-svn: 125083
Diffstat (limited to 'lldb/source/Target/ThreadPlanBase.cpp')
-rw-r--r--lldb/source/Target/ThreadPlanBase.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Target/ThreadPlanBase.cpp b/lldb/source/Target/ThreadPlanBase.cpp
index b83306cb62a..7529991a7bd 100644
--- a/lldb/source/Target/ThreadPlanBase.cpp
+++ b/lldb/source/Target/ThreadPlanBase.cpp
@@ -18,6 +18,7 @@
#include "lldb/Breakpoint/BreakpointSite.h"
#include "lldb/Breakpoint/BreakpointLocation.h"
#include "lldb/Breakpoint/Breakpoint.h"
+#include "lldb/Core/Log.h"
#include "lldb/Core/Stream.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/RegisterContext.h"
@@ -82,6 +83,8 @@ ThreadPlanBase::ShouldStop (Event *event_ptr)
m_stop_vote = eVoteYes;
m_run_vote = eVoteYes;
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
+
StopInfoSP stop_info_sp = GetPrivateStopReason();
if (stop_info_sp)
{
@@ -101,6 +104,8 @@ ThreadPlanBase::ShouldStop (Event *event_ptr)
// If we are going to stop for a breakpoint, then unship the other plans
// at this point. Don't force the discard, however, so Master plans can stay
// in place if they want to.
+ if (log)
+ log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4x (breakpoint hit.)", m_thread.GetID());
m_thread.DiscardThreadPlans(false);
return true;
}
@@ -127,12 +132,16 @@ ThreadPlanBase::ShouldStop (Event *event_ptr)
case eStopReasonException:
// If we crashed, discard thread plans and stop. Don't force the discard, however,
// since on rerun the target may clean up this exception and continue normally from there.
+ if (log)
+ log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4x (exception.)", m_thread.GetID());
m_thread.DiscardThreadPlans(false);
return true;
case eStopReasonSignal:
if (stop_info_sp->ShouldStop(event_ptr))
{
+ if (log)
+ log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4x (signal.)", m_thread.GetID());
m_thread.DiscardThreadPlans(false);
return true;
}
OpenPOWER on IntegriCloud