Changeset 09086b4 in rtems-tools for tools/gdb/python/classic.py


Ignore:
Timestamp:
Jul 27, 2013, 8:41:19 AM (6 years ago)
Author:
Dhananjay Balan <mb.dhananjay@…>
Branches:
4.10, 4.11, master
Children:
c3d06d5
Parents:
086e689
git-author:
Dhananjay Balan <mb.dhananjay@…> (07/27/13 08:41:19)
git-committer:
Chris Johns <chrisj@…> (08/24/14 23:52:40)
Message:

Support classic/partitions
Added support for partition object.

File:
1 edited

Legend:

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

    r086e689 r09086b4  
    4141                     'barrier'],
    4242        'message_queue' : ['priority',
    43                            'scope']
     43                           'scope'],
     44        'partition' : ['scope']
    4445        }
    4546
     
    164165
    165166class message_queue:
    166     "Print a classic messege queue"
     167    "Print classic messege queue"
    167168
    168169    def __init__(self,id):
     
    195196        print '     Name:', self.object_control.name()
    196197        self.watchdog.show()
     198
     199class partition:
     200    ''' Print a rtems partition '''
     201
     202    def __init__(self, id):
     203        self.id = id
     204        self.object = objects.information.object(self.id).dereference()
     205        self.object_control = objects.control(self.object['Object'])
     206        self.attr = attribute(self.object['attribute_set'], 'partition')
     207        self.starting_addr = self.object['starting_address']
     208        self.length = self.object['length']
     209        self.buffer_size = self.object['buffer_size']
     210        self.used_blocks = self.object['number_of_used_blocks']
     211
     212    def show(self, from_tty):
     213        # ToDo: the printing still somewhat crude.
     214        print '     Name:', self.object_control.name()
     215        print '     Attr:', self.attr.to_string()
     216        print '   Length:', self.length
     217        print 'Buffer Size:', self.buffer_size
     218        print 'Used Blocks:', self.used_blocks
     219
Note: See TracChangeset for help on using the changeset viewer.