diff options
author | Dhananjay Balan <mb.dhananjay@gmail.com> | 2013-08-24 15:08:16 +0530 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2014-08-25 09:52:41 +1000 |
commit | a245635a2e3c7b9ef5ebfc480b6115544c3d4340 (patch) | |
tree | e262d1ae675317e86f287bc80b2b9ac74d009a01 /tools/gdb/python/supercore.py | |
parent | a0bf9f207ac34ddaca42e0506b3743e6f416bd85 (diff) |
Add subcommand
rtems tod - prints the time of day.
Diffstat (limited to '')
-rw-r--r-- | tools/gdb/python/supercore.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/gdb/python/supercore.py b/tools/gdb/python/supercore.py index e60813a..6116626 100644 --- a/tools/gdb/python/supercore.py +++ b/tools/gdb/python/supercore.py @@ -5,6 +5,31 @@ import threads import helper +class time_of_day: + '''Manage time of day object''' + + def __init__(self, tod): + self.tod = tod + + def now(self): + return self.tod['now'] + + def timer(self): + return self.tod['uptime'] + + def is_set(self): + return bool(self.tod['is_set']) + + def show(self): + print ' Time Of Day' + + if not self.is_set(): + print ' Application has not set a TOD' + + print ' Now:', self.now() + print ' Uptime:', self.timer() + + class message_queue: '''Manage a Supercore message_queue''' |