summaryrefslogtreecommitdiff
path: root/tools/gdb/python/supercore.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gdb/python/supercore.py')
-rw-r--r--tools/gdb/python/supercore.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/gdb/python/supercore.py b/tools/gdb/python/supercore.py
index e60813a..6116626 100644
--- a/tools/gdb/python/supercore.py
+++ b/tools/gdb/python/supercore.py
@@ -5,6 +5,31 @@
import threads
import helper
+class time_of_day:
+ '''Manage time of day object'''
+
+ def __init__(self, tod):
+ self.tod = tod
+
+ def now(self):
+ return self.tod['now']
+
+ def timer(self):
+ return self.tod['uptime']
+
+ def is_set(self):
+ return bool(self.tod['is_set'])
+
+ def show(self):
+ print ' Time Of Day'
+
+ if not self.is_set():
+ print ' Application has not set a TOD'
+
+ print ' Now:', self.now()
+ print ' Uptime:', self.timer()
+
+
class message_queue:
'''Manage a Supercore message_queue'''