From 54ad72e4ddb3a2a2f771e3e904376559eeded14f Mon Sep 17 00:00:00 2001
From: Nadav Har'El <nyh@cloudius-systems.com>
Date: Tue, 26 Nov 2013 14:55:49 +0200
Subject: [PATCH] gdb: Fix printout of runtime

Fix the printout of runtime by "osv info threads" and "osv runqueue"
debugger commands, to fit the new scheduler (different variable name,
and it is float, not integer).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
---
 scripts/loader.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/loader.py b/scripts/loader.py
index 8bc898204..5fafafea1 100644
--- a/scripts/loader.py
+++ b/scripts/loader.py
@@ -446,14 +446,14 @@ class osv_info_threads(gdb.Command):
                             fname = fname[6:]
 
                 status = str(t['_status']['_M_i']).replace('sched::thread::', '')
-                gdb.write('%4d (0x%x) cpu%s %-10s %s at %s:%s vruntime %12d\n' %
+                gdb.write('%4d (0x%x) cpu%s %-10s %s at %s:%s vruntime %12g\n' %
                           (tid, ulong(t.address),
                            cpu['arch']['acpi_id'],
                            status,
                            function,
                            fname,
                            sal.line,
-                           t['_vruntime'],
+                           t['_runtime']['_Rtt'],
                            )
                           )
 
@@ -1010,7 +1010,7 @@ class osv_runqueue(gdb.Command):
         for cpu in xrange(ncpus) :
             gdb.write("CPU %d:\n" % cpu)
             for thread in runqueue(cpu):
-                print '%d 0x%x %d' % (thread['_id'], ulong(thread), thread['_vruntime'])
+                print '%d 0x%x %g' % (thread['_id'], ulong(thread), thread['_runtime']['_Rtt'])
 
 
 osv()
-- 
GitLab