Messege Queue Objects

Added intial support for printing
This commit is contained in:
Dhananjay Balan
2013-07-08 21:42:48 +05:30
committed by Chris Johns
parent ce55b57c4c
commit f814c7629c
2 changed files with 27 additions and 11 deletions

View File

@@ -36,7 +36,9 @@ class attribute:
'semaphore-pri-ceiling'], 'semaphore-pri-ceiling'],
'barrier' : ['scope', 'barrier' : ['scope',
'priority', 'priority',
'barrier'] 'barrier'],
'message_queue' : ['priority',
'scope']
} }
masks = { masks = {
@@ -214,3 +216,16 @@ class task:
print ' T Budget:', self.task.cpu_time_budget() print ' T Budget:', self.task.cpu_time_budget()
wait_info = self.task.wait_info() wait_info = self.task.wait_info()
class message_queue:
"Print a classic messege queue"
def __init__(self,id):
self.id = id
self.object = objects.information.object(self.id).dereference()
self.object_control = objects.control(self.object['Object'])
self.attr = attribute(self.object['attribute_set'], \
'message_queue')
def show(self, from_tty):
print ' Name:', self.object_control.name()
print ' Attr:', self.attr.to_string()

View File

@@ -72,7 +72,8 @@ class rtems_object(gdb.Command):
objects = { objects = {
'classic/semaphores': lambda id: classic.semaphore(id), 'classic/semaphores': lambda id: classic.semaphore(id),
'classic/tasks': lambda id: classic.task(id) 'classic/tasks': lambda id: classic.task(id),
'classic/message_queues': lambda id: classic.message_queue(id)
} }
def __init__(self): def __init__(self):