diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-03-23 01:24:54 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-03-23 01:24:54 +0000 |
commit | 0e101458287815d449beaaad59b6610e4709ee96 (patch) | |
tree | 9eb7be6f4b10242b48c1c362b1c9c135a88f6141 /gdb/gdbtypes.h | |
parent | 882c8f02fb98d2f95ff40e9fe7d4c77439d0bc18 (diff) | |
download | gdb-0e101458287815d449beaaad59b6610e4709ee96.zip gdb-0e101458287815d449beaaad59b6610e4709ee96.tar.gz gdb-0e101458287815d449beaaad59b6610e4709ee96.tar.bz2 |
* gdbtypes.c (append_composite_type_field): New function.
(init_composite_type): New function.
* gdbtypes.h (append_composite_type_field): Declare.
(init_composite_type): Ditto.
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r-- | gdb/gdbtypes.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 74b521a..f4a2cf6 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -1054,6 +1054,16 @@ extern struct type *alloc_type (struct objfile *); extern struct type *init_type (enum type_code, int, int, char *, struct objfile *); +/* Helper functions to construct a struct or record type. An + initially empty type is created using init_composite_type(). + Fields are then added using append_struct_type_field(). A union + type has its size set to the largest field. A struct type has each + field packed against the previous. */ + +extern struct type *init_composite_type (char *name, enum type_code code); +extern void append_composite_type_field (struct type *t, char *name, + struct type *field); + extern struct type *lookup_reference_type (struct type *); extern struct type *make_reference_type (struct type *, struct type **); |