From 4f465cff8a1591a821d13c7fb34bfc56c1d1d96f Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Wed, 10 Oct 2012 18:32:14 +0000 Subject: Change the Thread constructor over to take a Process& rather than a ProcessSP. We can't create Threads with a NULL ProcessSP, so it makes no sense to use the SP. Then make the Thread a Broadcaster, and get it to broadcast when the selected frame is changed (but only from the Command Line) and when Thread::ReturnFromFrame changes the stack. Made the Driver use this notification to print the new thread status rather than doing it in the command. Fixed a few places where people were setting their broadcaster class by hand rather than using the static broadcaster class call. llvm-svn: 165640 --- lldb/scripts/Python/interface/SBThread.i | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lldb/scripts/Python/interface') diff --git a/lldb/scripts/Python/interface/SBThread.i b/lldb/scripts/Python/interface/SBThread.i index 7c5d9f5bc95..76a014a6eca 100644 --- a/lldb/scripts/Python/interface/SBThread.i +++ b/lldb/scripts/Python/interface/SBThread.i @@ -46,6 +46,15 @@ public: SBThread (const lldb::SBThread &thread); ~SBThread(); + + static bool + EventIsThreadEvent (const SBEvent &event); + + static SBFrame + GetStackFrameFromEvent (const SBEvent &event); + + static SBThread + GetThreadFromEvent (const SBEvent &event); bool IsValid() const; @@ -183,6 +192,9 @@ public: bool GetDescription (lldb::SBStream &description) const; + bool + GetStatus (lldb::SBStream &status) const; + %pythoncode %{ class frames_access(object): '''A helper object that will lazily hand out frames for a thread when supplied an index.''' -- cgit v1.2.3