diff options
Diffstat (limited to 'tools/gdb/python/rtems.py')
-rw-r--r-- | tools/gdb/python/rtems.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/gdb/python/rtems.py b/tools/gdb/python/rtems.py index b142f23..cf2000a 100644 --- a/tools/gdb/python/rtems.py +++ b/tools/gdb/python/rtems.py @@ -10,6 +10,7 @@ import re import objects import threads +import supercore import classic @@ -184,3 +185,23 @@ class rtems_barrier(rtems_index): def instance(self, obj): return classic.barrier(obj) +class rtems_tod(gdb.Command): + '''Print rtems time of day''' + + api = 'internal' + _class = 'time' + + def __init__(self): + self.__doc__ = 'Display RTEMS time of day' + super(rtems_tod, self).__init__ \ + ('rtems tod', gdb.COMMAND_STATUS,gdb.COMPLETE_NONE) + + def invoke(self, arg, from_tty): + + if arg: + print "warning: commad takes no arguments!" + + obj = objects.information.object_return(self.api,self._class) + instance = supercore.time_of_day(obj) + instance.show() + objects.information.invalidate() |