From 9917459559bc19145317d399c72c308c9a33a03e Mon Sep 17 00:00:00 2001 From: "elias.bachaalany" Date: Mon, 5 Oct 2009 10:35:27 +0000 Subject: [PATCH] idautils.py: Added Threads() iterator to enum threads --- python/idautils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/idautils.py b/python/idautils.py index b25aeb9..b668e9d 100644 --- a/python/idautils.py +++ b/python/idautils.py @@ -171,6 +171,10 @@ def XrefsTo(ea, flags=0): while xref.next_to(): yield _copy_xref(xref) +def Threads(): + """Returns all thread IDs""" + for i in xrange(0, idc.GetThreadQty()): + yield idc.GetThreadId(i) def Heads(start=idaapi.cvar.inf.minEA, end=idaapi.cvar.inf.maxEA): """