summaryrefslogtreecommitdiff
path: root/gdb/target-descriptions.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2010-03-01 17:19:21 +0000
committerDaniel Jacobowitz <dan@debian.org>2010-03-01 17:19:21 +0000
commitcb928c67c90cfb5bbb0636d91855b95e51ad275d (patch)
tree299b7613c5cae82323af01a2dc1a4e1e52708bb8 /gdb/target-descriptions.h
parentd454b7529a5e6134ace8541b341d079534f2062a (diff)
downloadgdb-cb928c67c90cfb5bbb0636d91855b95e51ad275d.tar.gz
* 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/target-descriptions.h')
-rw-r--r--gdb/target-descriptions.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/target-descriptions.h b/gdb/target-descriptions.h
index da0564b556c..caa72302df1 100644
--- a/gdb/target-descriptions.h
+++ b/gdb/target-descriptions.h
@@ -205,10 +205,20 @@ struct tdesc_type *tdesc_create_vector (struct tdesc_feature *feature,
const char *name,
struct tdesc_type *field_type,
int count);
+struct tdesc_type *tdesc_create_struct (struct tdesc_feature *feature,
+ const char *name);
+void tdesc_set_struct_size (struct tdesc_type *type, LONGEST size);
struct tdesc_type *tdesc_create_union (struct tdesc_feature *feature,
const char *name);
+struct tdesc_type *tdesc_create_flags (struct tdesc_feature *feature,
+ const char *name,
+ LONGEST size);
void tdesc_add_field (struct tdesc_type *type, const char *field_name,
struct tdesc_type *field_type);
+void tdesc_add_bitfield (struct tdesc_type *type, const char *field_name,
+ int start, int end);
+void tdesc_add_flag (struct tdesc_type *type, int start,
+ const char *flag_name);
void tdesc_create_reg (struct tdesc_feature *feature, const char *name,
int regnum, int save_restore, const char *group,
int bitsize, const char *type);