Avoid NULL dereference.
[deliverable/binutils-gdb.git] / gdb / gdbtypes.h
index 2a41c5b90a6d7493c89dc40f5e2e2aa4318d1f38..c90b6d7bdb4a8fc4b72ca097d3d1023faee20870 100644 (file)
@@ -1,7 +1,7 @@
 /* Internal type definitions for GDB.
 
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+   2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support, using pieces from other GDB modules.
 
@@ -28,6 +28,7 @@
 /* Forward declarations for prototypes.  */
 struct field;
 struct block;
+struct value_print_options;
 
 /* Some macros for char-based bitfields.  */
 
@@ -814,15 +815,15 @@ extern void allocate_cplus_struct_type (struct type *);
 /* Moto-specific stuff for FORTRAN arrays */
 
 #define TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED(arraytype) \
-   (TYPE_FIELD_ARTIFICIAL((TYPE_FIELD_TYPE((arraytype),0)),1))
+   (TYPE_FIELD_ARTIFICIAL(TYPE_INDEX_TYPE((arraytype)),1))
 #define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \
-   (TYPE_FIELD_ARTIFICIAL((TYPE_FIELD_TYPE((arraytype),0)),0))
+   (TYPE_FIELD_ARTIFICIAL(TYPE_INDEX_TYPE((arraytype)),0))
 
 #define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \
-   (TYPE_FIELD_BITPOS((TYPE_FIELD_TYPE((arraytype),0)),1))
+   (TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype))))
 
 #define TYPE_ARRAY_LOWER_BOUND_VALUE(arraytype) \
-   (TYPE_FIELD_BITPOS((TYPE_FIELD_TYPE((arraytype),0)),0))
+   (TYPE_LOW_BOUND(TYPE_INDEX_TYPE((arraytype))))
 
 /* C++ */
 
@@ -1111,6 +1112,10 @@ extern struct type *init_type (enum type_code, int, int, char *,
 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 void append_composite_type_field_aligned (struct type *t,
+                                                char *name,
+                                                struct type *field,
+                                                int alignment);
 
 /* Helper functions to construct a bit flags type.  An initially empty
    type is created using init_flag_type().  Flags are then added using
@@ -1246,8 +1251,9 @@ extern int field_is_static (struct field *);
 
 /* printcmd.c */
 
-extern void print_scalar_formatted (const void *, struct type *, int, int,
-                                   struct ui_file *);
+extern void print_scalar_formatted (const void *, struct type *,
+                                   const struct value_print_options *,
+                                   int, struct ui_file *);
 
 extern int can_dereference (struct type *);
 
This page took 0.025053 seconds and 4 git commands to generate.