summaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-04-26 20:08:19 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-04-26 20:08:19 +0000
commit4e84ce0399ee94849c84c70ae121122c8de42cee (patch)
treeba15e22786f8901f8116fdb7540b2929291821f8 /gdb/dwarf2read.c
parentf68d4bcc932ea98bc424927758661827bcdbdc1a (diff)
downloadgdb-4e84ce0399ee94849c84c70ae121122c8de42cee.tar.gz
2002-04-24 Elena Zannoni <ezannoni@redhat.com>
* gdbtypes.h (TYPE_FLAG_VECTOR, TYPE_VECTOR): Define. * gdbtypes.c (recursive_dump_type): Output the vector flag. * dwarf2read.c (dwarf_attr_name): Handle new attribute for vectors. (read_array_type): Record the fact that this array type is really a vector (i.e. are passed in by value).
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 4673f9a7dff..0f05c0922fc 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -2662,6 +2662,16 @@ read_array_type (struct die_info *die, struct objfile *objfile,
while (ndim-- > 0)
type = create_array_type (NULL, type, range_types[ndim]);
+ /* Understand Dwarf2 support for vector types (like they occur on
+ the PowerPC w/ AltiVec). Gcc just adds another attribute to the
+ array type. This is not part of the Dwarf2/3 standard yet, but a
+ custom vendor extension. The main difference between a regular
+ array and the vector variant is that vectors are passed by value
+ to functions. */
+ attr = dwarf_attr (die, DW_AT_GNU_vector);
+ if (attr)
+ TYPE_FLAGS (type) |= TYPE_FLAG_VECTOR;
+
do_cleanups (back_to);
/* Install the type in the die. */
@@ -5267,6 +5277,8 @@ dwarf_attr_name (register unsigned attr)
return "DW_AT_body_begin";
case DW_AT_body_end:
return "DW_AT_body_end";
+ case DW_AT_GNU_vector:
+ return "DW_AT_GNU_vector";
default:
return "DW_AT_<unknown>";
}