diff options
author | Dhananjay Balan <mb.dhananjay@gmail.com> | 2013-08-20 21:47:22 +0530 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2014-08-25 09:52:41 +1000 |
commit | 8d035f8556f5c121b709c1cd6ed223fa2b70b66c (patch) | |
tree | ca3e2b22695b12651f26cf63407c92f10adf0264 /tools/gdb/python/helper.py | |
parent | Add message_queue subcommand. (diff) | |
download | rtems-tools-8d035f8556f5c121b709c1cd6ed223fa2b70b66c.tar.bz2 |
Refactor
- pretty printers moved to pretty module
- command and subcommands get own module
Diffstat (limited to 'tools/gdb/python/helper.py')
-rw-r--r-- | tools/gdb/python/helper.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/gdb/python/helper.py b/tools/gdb/python/helper.py index c9c9a42..146ee69 100644 --- a/tools/gdb/python/helper.py +++ b/tools/gdb/python/helper.py @@ -1,8 +1,18 @@ # # RTEMS GDB support helper routins. +import gdb + def tasks_printer_routine(wait_queue): tasks = wait_queue.tasks() print ' Queue: len = %d, state = %s' % (len(tasks),wait_queue.state()) for t in range(0, len(tasks)): - print ' ', tasks[t].brief(), ' (%08x)' % (tasks[t].id())
\ No newline at end of file + print ' ', tasks[t].brief(), ' (%08x)' % (tasks[t].id()) + +def type_from_value(val): + type = val.type; + # If it points to a reference, get the reference. + if type.code == gdb.TYPE_CODE_REF: + type = type.target () + # Get the unqualified type + return type.unqualified () |