-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
#
# This file is part of GDB.
#
return
# Note: TYPE_FLAG_MIN is a duplicate of TYPE_FLAG_UNSIGNED,
# so exclude it from the list we are building.
- TYPE_FLAGS = [TypeFlag(field.name, field.bitpos)
+ TYPE_FLAGS = [TypeFlag(field.name, field.enumval)
for field in flags.fields()
if field.name != 'TYPE_FLAG_MIN']
- TYPE_FLAGS += [TypeFlag(field.name, field.bitpos)
+ TYPE_FLAGS += [TypeFlag(field.name, field.enumval)
for field in iflags.fields()]
TYPE_FLAGS.sort()
loc_kind = str(field_val['loc_kind'])
if loc_kind == "FIELD_LOC_KIND_BITPOS":
return 'bitpos = %d' % loc_val['bitpos']
+ elif loc_kind == "FIELD_LOC_KIND_ENUMVAL":
+ return 'enumval = %d' % loc_val['enumval']
elif loc_kind == "FIELD_LOC_KIND_PHYSADDR":
return 'physaddr = 0x%x' % loc_val['physaddr']
elif loc_kind == "FIELD_LOC_KIND_PHYSNAME":
"""Return an image of the main_type field number FIELDNO.
"""
f = self.val['flds_bnds']['fields'][fieldno]
- label = "field[%d]:" % fieldno
+ label = "flds_bnds.fields[%d]:" % fieldno
if f['artificial']:
label += " (artificial)"
fields = []
high = str(b['high'])
if b['high_undefined'] != 0:
high += " (undefined)"
- return "bounds = {%s, %s}" % (low, high)
+ return "flds_bnds.bounds = {%s, %s}" % (low, high)
def type_specific_img(self):
"""Return a string image of the main_type type_specific union.
Only the relevant component of that union is printed (based on