Changeset 09086b4 in rtems-tools


Ignore:
Timestamp:
Jul 27, 2013, 8:41:19 AM (6 years ago)
Author:
Dhananjay Balan <mb.dhananjay@…>
Branches:
4.10, 4.11, e9f48e9face6c4dea62712d73b35412c0fe10332
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.

Location:
tools/gdb/python
Files:
3 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
  • tools/gdb/python/classic_printer.py

    r086e689 r09086b4  
    22# RTEMS Classic pretty printers for GDB
    33#
     4import classic
     5import gdb
    46
    57class attribute:
     
    1315
    1416class semaphore:
    15     """ToDo: Print a Semaphore_Control object. Print using the struct display hint
     17    """Print a Semaphore_Control object. Print using the struct display hint
    1618    and an iterator. """
    1719
  • tools/gdb/python/rtems.py

    r086e689 r09086b4  
    7979        'classic/tasks': lambda id: classic.task(id),
    8080        'classic/message_queues': lambda id: classic.message_queue(id),
    81         'classic/timers' : lambda id: classic.timer(id)
     81        'classic/timers' : lambda id: classic.timer(id),
     82        'classic/partitions' : lambda id: classic.partition(id)
    8283        }
    8384
Note: See TracChangeset for help on using the changeset viewer.