summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/StopInfo.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2013-02-22 21:23:43 +0000
committerJim Ingham <jingham@apple.com>2013-02-22 21:23:43 +0000
commit9b620f341a4810a1538706c73887f3cd913022ea (patch)
tree2810e50c21c191ea65eea0cbd83b5cbc72634fec /lldb/source/Target/StopInfo.cpp
parent19457e282e3ed5dc3bd981be27dabdc2e62ef481 (diff)
downloadbcm5719-llvm-9b620f341a4810a1538706c73887f3cd913022ea.tar.gz
bcm5719-llvm-9b620f341a4810a1538706c73887f3cd913022ea.zip
The thread plans run before the event is broadcast, so they should be calling ShouldStopSynchronous on any Stop Info's
they want to check. The full ShouldStop should only be called on the public side of the event system. llvm-svn: 175922
Diffstat (limited to 'lldb/source/Target/StopInfo.cpp')
-rw-r--r--lldb/source/Target/StopInfo.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/lldb/source/Target/StopInfo.cpp b/lldb/source/Target/StopInfo.cpp
index 3500a88f2fe..322d05ed181 100644
--- a/lldb/source/Target/StopInfo.cpp
+++ b/lldb/source/Target/StopInfo.cpp
@@ -569,7 +569,7 @@ public:
protected:
virtual bool
- ShouldStop (Event *event_ptr)
+ ShouldStopSynchronous (Event *event_ptr)
{
// ShouldStop() method is idempotent and should not affect hit count.
// See Process::RunPrivateStateThread()->Process()->HandlePrivateEvent()
@@ -604,6 +604,15 @@ protected:
return m_should_stop;
}
+ bool
+ ShouldStop (Event *event_ptr)
+ {
+ // This just reports the work done by PerformAction or the synchronous stop. It should
+ // only ever get called after they have had a chance to run.
+ assert (m_should_stop_is_valid);
+ return m_should_stop;
+ }
+
virtual void
PerformAction (Event *event_ptr)
{
@@ -759,6 +768,8 @@ protected:
if (log)
log->Printf ("Process::%s returning from action with m_should_stop: %d.", __FUNCTION__, m_should_stop);
+ m_should_stop_is_valid = true;
+
}
private:
OpenPOWER on IntegriCloud