summaryrefslogtreecommitdiffstats
path: root/tools/gdb/python/supercore.py
diff options
context:
space:
mode:
authorDhananjay Balan <mb.dhananjay@gmail.com>2013-07-12 19:07:46 +0530
committerChris Johns <chrisj@rtems.org>2014-08-25 09:52:40 +1000
commita785e254f2360e946baa14a11fbd3f403047b880 (patch)
treeb8ce0a76ca0340225d2b58f826ad9e2595cdcdba /tools/gdb/python/supercore.py
parentHeavy refactoring + Improved mesege queu printing. (diff)
downloadrtems-tools-a785e254f2360e946baa14a11fbd3f403047b880.tar.bz2
Add printers to stage.
Diffstat (limited to 'tools/gdb/python/supercore.py')
-rw-r--r--tools/gdb/python/supercore.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/gdb/python/supercore.py b/tools/gdb/python/supercore.py
new file mode 100644
index 0000000..4378e12
--- /dev/null
+++ b/tools/gdb/python/supercore.py
@@ -0,0 +1,24 @@
+#
+# RTEMS Supercore Objects
+#
+
+import threads
+
+# ToDo: Move this to helper.
+def tasks_printer_rotuine(wait_queue):
+ tasks = wait_queue.tasks()
+ print ' Queue: len = %d, state = %s' % (len(tasks),wait_queue.state())
+ for t in range(0, len(tasks)):
+ print ' ', tasks[t].brief(), ' (%08x)' % (tasks[t].id())
+
+class CORE_message_queue:
+ '''Manage a Supercore message_queue'''
+
+ def __init__(self, message_queue):
+ self.queue = message_queue
+ self.wait_queue = threads.queue(self.queue['Wait_queue'])
+ # ToDo: self.attribute =''
+ # self.buffer
+
+ def show(self):
+ tasks_printer_rotuine(self.wait_queue)