diff options
Diffstat (limited to 'gdb/testsuite/gdb.python/py-prettyprint.py')
-rw-r--r-- | gdb/testsuite/gdb.python/py-prettyprint.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.py b/gdb/testsuite/gdb.python/py-prettyprint.py index 5f09ea8..fab03a6 100644 --- a/gdb/testsuite/gdb.python/py-prettyprint.py +++ b/gdb/testsuite/gdb.python/py-prettyprint.py @@ -57,8 +57,13 @@ class ContainerPrinter (object): return _iterator(self.val['elements'], self.val['len']) def display_hint (self): + if (self.val['is_map_p'] and self.val['is_array_p']): + raise Exception ("invalid object state found in display_hint") + if (self.val['is_map_p']): return 'map' + elif (self.val['is_array_p']): + return 'array' else: return None |