source: rtems-tools/tools/gdb/python/helper.py @ 8d035f8

4.104.115
Last change on this file since 8d035f8 was 8d035f8, checked in by Dhananjay Balan <mb.dhananjay@…>, on 08/20/13 at 16:17:22

Refactor

  • pretty printers moved to pretty module
  • command and subcommands get own module
  • Property mode set to 100644
File size: 537 bytes
Line 
1#
2# RTEMS GDB support helper routins.
3
4import gdb
5
6def tasks_printer_routine(wait_queue):
7    tasks = wait_queue.tasks()
8    print '    Queue: len = %d, state = %s' % (len(tasks),wait_queue.state())
9    for t in range(0, len(tasks)):
10        print '      ', tasks[t].brief(), ' (%08x)' % (tasks[t].id())
11
12def type_from_value(val):
13    type = val.type;
14    # If it points to a reference, get the reference.
15    if type.code == gdb.TYPE_CODE_REF:
16        type = type.target ()
17    # Get the unqualified type
18    return type.unqualified ()
Note: See TracBrowser for help on using the repository browser.