From 0e101458287815d449beaaad59b6610e4709ee96 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sat, 23 Mar 2002 01:24:54 +0000 Subject: * gdbtypes.c (append_composite_type_field): New function. (init_composite_type): New function. * gdbtypes.h (append_composite_type_field): Declare. (init_composite_type): Ditto. --- gdb/gdbtypes.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gdb/gdbtypes.h') 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 **); -- cgit v1.1