scripts/gdb: make get_thread_info accept pointers
[linux-block.git] / scripts / gdb / linux / tasks.py
index 6793d6e86e777b576e9acac680acdd8020c3d105..62348397c1f5c8af9990a3dea95bb231c663ff94 100644 (file)
@@ -85,7 +85,7 @@ thread_info_type = utils.CachedType("struct thread_info")
 
 def get_thread_info(task):
     thread_info_ptr_type = thread_info_type.get_type().pointer()
-    if task.type.fields()[0].type == thread_info_type.get_type():
+    if task_type.get_type().fields()[0].type == thread_info_type.get_type():
         return task['thread_info']
     thread_info = task['stack'].cast(thread_info_ptr_type)
     return thread_info.dereference()