Changeset b743d63 in rtems-tools for tools/gdb


Ignore:
Timestamp:
Aug 9, 2013, 12:16:37 PM (6 years ago)
Author:
Dhananjay Balan <mb.dhananjay@…>
Branches:
4.10, 4.11, e9f48e9face6c4dea62712d73b35412c0fe10332
Children:
2c25dc5
Parents:
a713688
git-author:
Dhananjay Balan <mb.dhananjay@…> (08/09/13 12:16:37)
git-committer:
Chris Johns <chrisj@…> (08/24/14 23:52:41)
Message:

Catch nonvalid indexes.

Catch IndexErrors? generated while referancing non existant indexes.

File:
1 edited

Legend:

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

    ra713688 rb743d63  
    131131                print "error: %s is not an index" % (val)
    132132                return
     133            try:
     134                obj = objects.information.object_return( self.api,
     135                                                         self._class,
     136                                                         index ).dereference()
     137            except IndexError:
     138                print "error: index %s is invalid" % (index)
     139                return
    133140
    134             obj = objects.information.object_return( self.api,
    135                                                  self._class,
    136                                                  int(index)).dereference()
    137141            instance = classic.semaphore(obj)
    138142            instance.show(from_tty)
Note: See TracChangeset for help on using the changeset viewer.