summaryrefslogtreecommitdiffstats
path: root/tools/gdb/python/rtems.py
diff options
context:
space:
mode:
authorDhananjay Balan <mb.dhananjay@gmail.com>2013-08-25 23:03:44 +0530
committerChris Johns <chrisj@rtems.org>2014-08-25 09:52:41 +1000
commita7176a8a7e5542d9371026b135a864f15d79e1b5 (patch)
tree3a4689b709f0aa9642c70a077969c3b19a30b5ae /tools/gdb/python/rtems.py
parentAdded register class (diff)
downloadrtems-tools-a7176a8a7e5542d9371026b135a864f15d79e1b5.tar.bz2
Add watchdog ticks command.
- ToDo : Fix watchdog states.
Diffstat (limited to 'tools/gdb/python/rtems.py')
-rw-r--r--tools/gdb/python/rtems.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/gdb/python/rtems.py b/tools/gdb/python/rtems.py
index cf2000a..64c7f1a 100644
--- a/tools/gdb/python/rtems.py
+++ b/tools/gdb/python/rtems.py
@@ -10,6 +10,7 @@ import re
import objects
import threads
+import chains
import supercore
import classic
@@ -205,3 +206,37 @@ class rtems_tod(gdb.Command):
instance = supercore.time_of_day(obj)
instance.show()
objects.information.invalidate()
+
+class rtems_watchdog_chain(gdb.Command):
+ '''Print watchdog ticks chain'''
+
+ api = 'internal'
+ _class = ''
+
+ def __init__(self,command):
+ super(rtems_watchdog_chain, self).__init__ \
+ (command, gdb.COMMAND_DATA, gdb.COMPLETE_NONE)
+
+ def invoke(self, arg, from_tty):
+ obj = objects.information.object_return(self.api, self._class)
+
+ inst = chains.control(obj)
+
+ if inst.empty():
+ print ' error: empty chain'
+ return
+
+ nd = inst.first()
+ while not nd.null():
+ wd = watchdog.control(nd.cast('Watchdog_Control'))
+ wd.show()
+ nd = nd.next()
+
+class rtems_wdt(rtems_watchdog_chain):
+
+ _class = 'wdticks'
+
+ def __init__(self):
+ self.__doc__ = 'Display watchdog ticks chain'
+ super(rtems_wdt, self).__init__('rtems wdticks')
+