Changeset f814c76 in rtems-tools


Ignore:
Timestamp:
Jul 8, 2013, 4:12:48 PM (6 years ago)
Author:
Dhananjay Balan <mb.dhananjay@…>
Branches:
4.10, 4.11, e9f48e9face6c4dea62712d73b35412c0fe10332
Children:
3856406
Parents:
ce55b57
git-author:
Dhananjay Balan <mb.dhananjay@…> (07/08/13 16:12:48)
git-committer:
Chris Johns <chrisj@…> (08/24/14 23:52:40)
Message:

Messege Queue Objects
Added intial support for printing

Location:
tools/gdb/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tools/gdb/python/classic.py

    rce55b57 rf814c76  
    3737        'barrier' : ['scope',
    3838                     'priority',
    39                      'barrier']
     39                     'barrier'],
     40        'message_queue' : ['priority',
     41                           'scope']
    4042        }
    4143
     
    6567        'semaphore-pri-ceiling' : [(0x00000000, 'no-pri-ceiling'),
    6668                                   (0x00000080, 'pri-ceiling')],
    67         'barrier' : [(0x00000010, 'barrier-auto-release'), 
     69        'barrier' : [(0x00000010, 'barrier-auto-release'),
    6870                     (0x00000000, 'barrier-manual-release')],
    6971        'task' : [(0x00000000, 'app-task'),
     
    98100
    99101class attribute_printer:
    100    
     102
    101103    def __init__(self, attr):
    102104        self.attr = attr
     
    125127                return self.semaphore['Object']
    126128            elif self.count == 2:
    127                 attr = attribute(self.semaphore['attribute_set'], 
     129                attr = attribute(self.semaphore['attribute_set'],
    128130                                 'semaphore')
    129131                return attr.to_string()
     
    163165        self.object_control = objects.control(self.object['Object'])
    164166        self.attr = attribute(self.object['attribute_set'], 'semaphore')
    165        
     167
    166168    def show(self, from_tty):
    167169        print '     Name:', self.object_control.name()
     
    203205        self.task = \
    204206            threads.control(objects.information.object(self.id).dereference())
    205        
     207
    206208    def show(self, from_tty):
    207209        print '     Name:', self.task.name()
     
    214216        print ' T Budget:', self.task.cpu_time_budget()
    215217        wait_info = self.task.wait_info()
    216        
     218
     219class message_queue:
     220    "Print a classic messege queue"
     221
     222    def __init__(self,id):
     223        self.id = id
     224        self.object = objects.information.object(self.id).dereference()
     225        self.object_control = objects.control(self.object['Object'])
     226        self.attr = attribute(self.object['attribute_set'], \
     227            'message_queue')
     228
     229    def show(self, from_tty):
     230        print '     Name:', self.object_control.name()
     231        print '     Attr:', self.attr.to_string()
  • tools/gdb/python/rtems.py

    rce55b57 rf814c76  
    7373    objects = {
    7474        'classic/semaphores': lambda id: classic.semaphore(id),
    75         'classic/tasks': lambda id: classic.task(id)
     75        'classic/tasks': lambda id: classic.task(id),
     76        'classic/message_queues': lambda id: classic.message_queue(id)
    7677        }
    7778
    7879    def __init__(self):
    7980        self.__doc__ = 'Display the RTEMS object given a numeric ID.'
    80         super(rtems_object, self).__init__('rtems object', 
     81        super(rtems_object, self).__init__('rtems object',
    8182                                           gdb.COMMAND_STATUS)
    8283
     
    99100                object.show(from_tty)
    100101        objects.information.invalidate()
    101            
     102
    102103#
    103104# Main
Note: See TracChangeset for help on using the changeset viewer.