@see: L{get_tid} @rtype: L{Thread} @return: Thread where the event occured.
(self)
| 241 | return process |
| 242 | |
| 243 | def get_thread(self): |
| 244 | """ |
| 245 | @see: L{get_tid} |
| 246 | |
| 247 | @rtype: L{Thread} |
| 248 | @return: Thread where the event occured. |
| 249 | """ |
| 250 | tid = self.get_tid() |
| 251 | process = self.get_process() |
| 252 | if process.has_thread(tid): |
| 253 | thread = process.get_thread(tid) |
| 254 | else: |
| 255 | # XXX HACK |
| 256 | # The thread object was missing for some reason, so make a new one. |
| 257 | thread = Thread(tid) |
| 258 | process._add_thread(thread) |
| 259 | return thread |
| 260 | |
| 261 | |
| 262 | # ============================================================================== |
no test coverage detected