diff options
author | Dhananjay Balan <mb.dhananjay@gmail.com> | 2013-07-28 14:45:58 +0530 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2014-08-25 09:52:40 +1000 |
commit | b9ee5df588aa1a4cf0a64cf511b0585309ff5510 (patch) | |
tree | 69ee1aa7385e8eff7cd975259a58a55d33c95731 /tools/gdb/python/classic.py | |
parent | Abstraction for HEAP. (diff) | |
download | rtems-tools-b9ee5df588aa1a4cf0a64cf511b0585309ff5510.tar.bz2 |
Add region support.
Abstractions for classic/region added.
Diffstat (limited to 'tools/gdb/python/classic.py')
-rw-r--r-- | tools/gdb/python/classic.py | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/tools/gdb/python/classic.py b/tools/gdb/python/classic.py index f7d4dfc..e2ecfaa 100644 --- a/tools/gdb/python/classic.py +++ b/tools/gdb/python/classic.py @@ -8,10 +8,13 @@ import gdb import itertools import re +#ToDo This shouldn't be here +import helper import objects import threads import watchdog +import heaps import supercore class attribute: @@ -41,7 +44,8 @@ class attribute: 'barrier'], 'message_queue' : ['priority', 'scope'], - 'partition' : ['scope'] + 'partition' : ['scope'], + 'region' : ['priority'] } masks = { @@ -214,6 +218,23 @@ class partition: 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 + print ' B Size:', self.buffer_size + print ' U Blocks:', self.used_blocks +class region: + "prints a classic region" + + 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'], 'region') + self.wait_queue = threads.queue(self.object['Wait_queue']) + self.heap = heaps.control(self.object['Memory']) + + def show(self, from_tty): + print ' Name:', self.object_control.name() + print ' Attr:', self.attr.to_string() + helper.tasks_printer_routine(self.wait_queue) + print ' Memory:' + self.heap.show() |