diff options
author | Daniel Jacobowitz <drow@false.org> | 2010-03-01 17:19:23 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2010-03-01 17:19:23 +0000 |
commit | f5dff7774412ef6e55e0913c616ca3d3d4af11b9 (patch) | |
tree | ee64065da0aee20dee473b32aece084458601b52 /gdb/features | |
parent | bd56defd73c18c6c04b2dcbfbc43f5d88a723753 (diff) | |
download | gdb-f5dff7774412ef6e55e0913c616ca3d3d4af11b9.zip gdb-f5dff7774412ef6e55e0913c616ca3d3d4af11b9.tar.gz gdb-f5dff7774412ef6e55e0913c616ca3d3d4af11b9.tar.bz2 |
* gdbtypes.c (append_composite_type_field_raw): New.
(append_composite_type_field_aligned): Use the new function.
* gdbtypes.h (append_composite_type_field_raw): Declare.
* target-descriptions.c (struct tdesc_type_field): Add start and end.
(struct tdesc_type_flag): New type.
(struct tdesc_type): Add TDESC_TYPE_STRUCT and TDESC_TYPE_FLAGS to
kind. Add size to u.u. Add u.f for flags.
(tdesc_gdb_type): Handle TDESC_TYPE_STRUCT and TDESC_TYPE_FLAGS.
(tdesc_free_type): Likewise.
(tdesc_create_struct, tdesc_set_struct_size, tdesc_create_flags): New.
(tdesc_add_field): Handle TDESC_TYPE_STRUCT.
(tdesc_add_bitfield, tdesc_add_flag): New.
* target-descriptions.h (tdesc_create_struct, tdesc_set_struct_size)
(tdesc_create_flags, tdesc_add_bitfield, tdesc_add_flag): Declare.
* xml-tdesc.c (struct tdesc_parsing_data): Rename current_union to
current_type. Add current_type_size and current_type_is_flags.
(tdesc_start_union): Clear the new fields.
(tdesc_start_struct, tdesc_start_flags): New.
(tdesc_start_field): Handle struct fields, including bitfields.
(field_attributes): Make type optional. Add start and end.
(union_children): Rename to struct_union_children.
(union_attributes): Rename to struct_union_attributes. Add optional
size.
(flags_attributes): New.
(feature_children): Add struct and flags.
* features/gdb-target.dtd: Add flags and struct to features.
Make field type optional. Add field start and end.
doc/
* gdb.texinfo (Types): Describe <struct> and <flags>.
testsuite/
* gdb.xml/extra-regs.xml: Add struct1, struct2, and flags
types. Add structreg, bitfields, and flags registers.
* gdb.xml/tdesc-regs.exp: Test structreg and bitfields
registers.
Diffstat (limited to 'gdb/features')
-rw-r--r-- | gdb/features/gdb-target.dtd | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gdb/features/gdb-target.dtd b/gdb/features/gdb-target.dtd index 3ba7eca..d5710ca 100644 --- a/gdb/features/gdb-target.dtd +++ b/gdb/features/gdb-target.dtd @@ -19,7 +19,8 @@ <!ELEMENT compatible (#PCDATA)> -<!ELEMENT feature ((vector | union)*, reg*)> +<!ELEMENT feature + ((vector | flags | struct | union )*, reg*)> <!ATTLIST feature name ID #REQUIRED> @@ -39,6 +40,16 @@ type CDATA #REQUIRED count CDATA #REQUIRED> +<!ELEMENT flags (field+)> +<!ATTLIST flags + id CDATA #REQUIRED + size CDATA #REQUIRED> + +<!ELEMENT struct (field+)> +<!ATTLIST struct + id CDATA #REQUIRED + size CDATA #IMPLIED> + <!ELEMENT union (field+)> <!ATTLIST union id CDATA #REQUIRED> @@ -46,7 +57,9 @@ <!ELEMENT field EMPTY> <!ATTLIST field name CDATA #REQUIRED - type CDATA #REQUIRED> + type CDATA #IMPLIED + start CDATA #IMPLIED + end CDATA #IMPLIED> <!ENTITY % xinclude SYSTEM "xinclude.dtd"> %xinclude; |