summaryrefslogtreecommitdiffstats
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.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)