Changeset 7a415d4 in rtems-tools


Ignore:
Timestamp:
Aug 24, 2013, 2:56:06 PM (6 years ago)
Author:
Dhananjay Balan <mb.dhananjay@…>
Branches:
4.10, 4.11, e9f48e9face6c4dea62712d73b35412c0fe10332
Children:
788a715
Parents:
a245635
git-author:
Dhananjay Balan <mb.dhananjay@…> (08/24/13 14:56:06)
git-committer:
Chris Johns <chrisj@…> (08/24/14 23:52:41)
Message:

Catch empty task names,

  • All the tasks do not have a name.
Location:
tools/gdb/python
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tools/gdb/python/classic.py

    ra245635 r7a415d4  
    141141            print '    Queue: len = %d, state = %s' % (len(tasks),
    142142                                                       wait_queue.state())
     143            print '    Tasks:'
     144            print '    Name (c:current, r:real), (id)'
    143145            for t in range(0, len(tasks)):
    144146                print '      ', tasks[t].brief(), ' (%08x)' % (tasks[t].id())
  • tools/gdb/python/objects.py

    ra245635 r7a415d4  
    254254    def name(self):
    255255        is_string = information.is_string(self._id.api(), self._id._class())
    256         return str(name(self.object['name'], is_string))
     256        val = str(name(self.object['name'],is_string))
     257
     258        # Normal comaprision is a bit tricky with quotes
     259        # 0 '\000' in hex == '3020275c30303027'
     260        if val.encode('hex') == '3020275c30303027':
     261            val = ""
     262
     263        return val
  • tools/gdb/python/threads.py

    ra245635 r7a415d4  
    77
    88import gdb
    9 
    109import chains
    1110import objects
     
    135134
    136135    def name(self):
    137         return self.object.name()
     136        val = self.object.name()
     137        if val == "":
     138            val = '*'
     139        return val
    138140
    139141    def current_state(self):
Note: See TracChangeset for help on using the changeset viewer.