-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
#
# This file is part of GDB.
#
and its value.
In the GDB sources, struct type has a component called instance_flags
- whose the value is the addition of various flags. These flags are
- defined by two emumerates: type_flag_value, and type_instance_flag_value.
+ in which the value is the addition of various flags. These flags are
+ defined by two enumerates: type_flag_value, and type_instance_flag_value.
This class helps us recreate a list with all these flags that is
easy to manipulate and sort. Because all flag names start with either
TYPE_FLAG_ or TYPE_INSTANCE_FLAG_, a short_name attribute is provided
"""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
% type_specific['gnat_stuff']['descriptive_type'])
elif type_specific_kind == "TYPE_SPECIFIC_FLOATFORMAT":
img = "floatformat[0..1] = %s" % type_specific['floatformat']
- elif type_specific_kind == "TYPE_SPECIFIC_CALLING_CONVENTION":
+ elif type_specific_kind == "TYPE_SPECIFIC_FUNC":
img = ("calling_convention = %d"
- % type_specific['calling_convention'])
+ % type_specific['func_stuff']['calling_convention'])
+ # tail_call_list is not printed.
else:
img = ("type_specific = ??? (unknown type_secific_kind: %s)"
% type_specific_kind)
if self.val['nfields'] > 0:
for fieldno in range(self.val['nfields']):
fields.append(self.struct_field_img(fieldno))
- if self.val.type.code == gdb.TYPE_CODE_RANGE:
+ if self.val['code'] == gdb.TYPE_CODE_RANGE:
fields.append(self.bounds_img())
fields.append(self.type_specific_img())