gdbhooks.py: fix prettyprinting of NULL vec<>*

* gdbhooks.py (VecPrinter.children): Don't attempt to iterate
	the children of a NULL pointer.

From-SVN: r205139
This commit is contained in:
David Malcolm 2013-11-20 20:00:33 +00:00 committed by David Malcolm
parent f9d3a450cc
commit 1fef36449e
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-11-20 David Malcolm <dmalcolm@redhat.com>
* gdbhooks.py (VecPrinter.children): Don't attempt to iterate
the children of a NULL pointer.
2013-11-20 Robert Suchanek <Robert.Suchanek@imgtec.com>
* lra.c (lra): Set lra_in_progress before check_rtl call.

View File

@ -383,6 +383,8 @@ class VecPrinter:
return '0x%x' % long(self.gdbval)
def children (self):
if long(self.gdbval) == 0:
return
m_vecpfx = self.gdbval['m_vecpfx']
m_num = m_vecpfx['m_num']
m_vecdata = self.gdbval['m_vecdata']