diff options
author | Dhananjay Balan <mb.dhananjay@gmail.com> | 2013-07-27 14:11:19 +0530 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2014-08-25 09:52:40 +1000 |
commit | 09086b415db7bb08cca41fc3fff212bbaece327a (patch) | |
tree | 4c92d0d76c60091bb1c737ca062b92d2bafbfe30 /tools/gdb/python/classic.py | |
parent | Added support for classic/timers. (diff) | |
download | rtems-tools-09086b415db7bb08cca41fc3fff212bbaece327a.tar.bz2 |
Support classic/partitions
Added support for partition object.
Diffstat (limited to 'tools/gdb/python/classic.py')
-rw-r--r-- | tools/gdb/python/classic.py | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/tools/gdb/python/classic.py b/tools/gdb/python/classic.py index 1f5daf2..f7d4dfc 100644 --- a/tools/gdb/python/classic.py +++ b/tools/gdb/python/classic.py @@ -40,7 +40,8 @@ class attribute: 'priority', 'barrier'], 'message_queue' : ['priority', - 'scope'] + 'scope'], + 'partition' : ['scope'] } masks = { @@ -163,7 +164,7 @@ class task: wait_info = self.task.wait_info() class message_queue: - "Print a classic messege queue" + "Print classic messege queue" def __init__(self,id): self.id = id @@ -193,4 +194,26 @@ class timer: def show(self, from_tty): print ' Name:', self.object_control.name() - self.watchdog.show()
\ No newline at end of file + self.watchdog.show() + +class partition: + ''' Print a rtems partition ''' + + 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'], 'partition') + self.starting_addr = self.object['starting_address'] + self.length = self.object['length'] + self.buffer_size = self.object['buffer_size'] + self.used_blocks = self.object['number_of_used_blocks'] + + def show(self, from_tty): + # ToDo: the printing still somewhat crude. + print ' Name:', self.object_control.name() + print ' Attr:', self.attr.to_string() + print ' Length:', self.length + print 'Buffer Size:', self.buffer_size + print 'Used Blocks:', self.used_blocks + |