mirror of
https://git.rtems.org/rtems-tools/
synced 2025-10-17 05:29:48 +08:00
Support classic/partitions
Added support for partition object.
This commit is contained in:

committed by
Chris Johns

parent
086e689955
commit
09086b415d
@@ -40,7 +40,8 @@ class attribute:
|
|||||||
'priority',
|
'priority',
|
||||||
'barrier'],
|
'barrier'],
|
||||||
'message_queue' : ['priority',
|
'message_queue' : ['priority',
|
||||||
'scope']
|
'scope'],
|
||||||
|
'partition' : ['scope']
|
||||||
}
|
}
|
||||||
|
|
||||||
masks = {
|
masks = {
|
||||||
@@ -163,7 +164,7 @@ class task:
|
|||||||
wait_info = self.task.wait_info()
|
wait_info = self.task.wait_info()
|
||||||
|
|
||||||
class message_queue:
|
class message_queue:
|
||||||
"Print a classic messege queue"
|
"Print classic messege queue"
|
||||||
|
|
||||||
def __init__(self,id):
|
def __init__(self,id):
|
||||||
self.id = id
|
self.id = id
|
||||||
@@ -193,4 +194,26 @@ class timer:
|
|||||||
|
|
||||||
def show(self, from_tty):
|
def show(self, from_tty):
|
||||||
print ' Name:', self.object_control.name()
|
print ' Name:', self.object_control.name()
|
||||||
self.watchdog.show()
|
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
|
||||||
|
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
#
|
#
|
||||||
# RTEMS Classic pretty printers for GDB
|
# RTEMS Classic pretty printers for GDB
|
||||||
#
|
#
|
||||||
|
import classic
|
||||||
|
import gdb
|
||||||
|
|
||||||
class attribute:
|
class attribute:
|
||||||
|
|
||||||
@@ -12,7 +14,7 @@ class attribute:
|
|||||||
return gdb.Value(self.attr.to_string())
|
return gdb.Value(self.attr.to_string())
|
||||||
|
|
||||||
class semaphore:
|
class semaphore:
|
||||||
"""ToDo: Print a Semaphore_Control object. Print using the struct display hint
|
"""Print a Semaphore_Control object. Print using the struct display hint
|
||||||
and an iterator. """
|
and an iterator. """
|
||||||
|
|
||||||
class iterator:
|
class iterator:
|
||||||
|
@@ -78,7 +78,8 @@ class rtems_object(gdb.Command):
|
|||||||
'classic/semaphores': lambda id: classic.semaphore(id),
|
'classic/semaphores': lambda id: classic.semaphore(id),
|
||||||
'classic/tasks': lambda id: classic.task(id),
|
'classic/tasks': lambda id: classic.task(id),
|
||||||
'classic/message_queues': lambda id: classic.message_queue(id),
|
'classic/message_queues': lambda id: classic.message_queue(id),
|
||||||
'classic/timers' : lambda id: classic.timer(id)
|
'classic/timers' : lambda id: classic.timer(id),
|
||||||
|
'classic/partitions' : lambda id: classic.partition(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
Reference in New Issue
Block a user