From 24b8c7058a999ffecbe3b9983c1971a57ae03df5 Mon Sep 17 00:00:00 2001
From: Avi Kivity <avi@cloudius-systems.com>
Date: Tue, 12 Feb 2013 15:12:47 +0200
Subject: [PATCH] gdb: print state of running threads correctly

---
 scripts/loader.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/loader.py b/scripts/loader.py
index 44559f701..2e12dc512 100644
--- a/scripts/loader.py
+++ b/scripts/loader.py
@@ -222,6 +222,8 @@ class osv_info_threads(gdb.Command):
                 status = 'rdy '
                 if long(t['_waiting']['_M_base']['_M_i']):
                     status = 'wait'
+                if state.cpu_from_thread(t):
+                    status = 'run '
                 function = '??'
                 if fr.function():
                     function = fr.function().name
-- 
GitLab