* breakpoint.c, breakpoint.h (breakpoint_init_inferior): New function
[deliverable/binutils-gdb.git] / gdb / gdbtypes.h
index c582df14399f0514626e6bbd75d05782aaa7b655..89cad6cbbe5d88de9b8bd60d7e42717bb80e6e56 100644 (file)
@@ -122,7 +122,7 @@ enum type_code
 
 #define TYPE_FLAG_SIGNED       (1 << 1)
 
-/* This appears in a type's flags word if it is a stub type (eg. if
+/* This appears in a type's flags word if it is a stub type (e.g., if
    someone referenced a type that wasn't defined in a source file
    via (struct sir_not_appearing_in_this_film *)).  */
 
@@ -150,7 +150,9 @@ struct type
      with this feature.
 
      This is used for printing only, except by poorly designed C++ code.
-     For looking up a name, look for a symbol in the STRUCT_NAMESPACE.  */
+     For looking up a name, look for a symbol in the STRUCT_NAMESPACE.
+     One more legitimate use is that if TYPE_FLAG_STUB is set, this is
+     the name to use to look for definitions in other files.  */
 
   char *tag_name;
 
@@ -238,8 +240,10 @@ struct type
       /* Size of this field, in bits, or zero if not packed.
         For an unpacked field, the field's type's length
         says how many bytes the field occupies.  */
+      /* FIXME: This is abused by TYPE_FIELD_STATIC_PHYSNAME to contain 
+        a pointer, so it has to be long.  */
 
-      int bitsize;
+      long bitsize;
 
       /* In a struct or enum type, type of this field.
         In a function type, type of this argument.
@@ -255,8 +259,7 @@ struct type
     } *fields;
 
   /* For types with virtual functions, VPTR_BASETYPE is the base class which
-     defined the virtual function table pointer.  VPTR_FIELDNO is
-     the field number of that pointer in the structure.
+     defined the virtual function table pointer.  
 
      For types that are pointer to member types, VPTR_BASETYPE
      is the type that this pointer is a member of.
@@ -265,6 +268,13 @@ struct type
 
   struct type *vptr_basetype;
 
+  /* Field number of the virtual function table pointer in
+     VPTR_BASETYPE.  If -1, we were unable to find the virtual
+     function table pointer in initial symbol reading, and
+     fill_in_vptr_fieldno should be called to find it if possible.
+
+     Unused if this type does not have virtual functions.  */
+
   int vptr_fieldno;
 
   /* Slot to point to additional language-specific fields of this type.  */
@@ -292,7 +302,10 @@ struct type
 
 struct cplus_struct_type
 {
-  /* Number of base classes this type derives from. */
+  /* Number of base classes this type derives from.  The baseclasses are
+     stored in the first N_BASECLASSES fields (i.e. the `fields' field of
+     the struct type).  I think only the `type' field of such a field has
+     any meaning.  */
 
   short n_baseclasses;
 
@@ -357,7 +370,16 @@ struct cplus_struct_type
       struct fn_field
        {
 
-         /* The name after it has been processed */
+         /* If is_stub is clear, this is the mangled name which we can
+            look up to find the address of the method (FIXME: it would
+            be cleaner to have a pointer to the struct symbol here
+            instead).  */
+
+         /* If is_stub is set, this is the portion of the mangled
+            name which specifies the arguments.  For example, "ii",
+            if there are two int arguments, or "" if there are no
+            arguments.  See gdb_mangle_name for the conversion from this
+            format to the one used if is_stub is clear.  */
 
          char *physname;
 
@@ -365,7 +387,9 @@ struct cplus_struct_type
 
          struct type *type;
 
-         /* The argument list */
+         /* The argument list.  Only valid if is_stub is clear.  Contains
+            the type of each argument, including `this', and ending with
+            a NULL pointer after the last argument.  */
 
          struct type **args;
 
@@ -380,7 +404,12 @@ struct cplus_struct_type
          unsigned int is_volatile : 1;
          unsigned int is_private : 1;
          unsigned int is_protected : 1;
+
+         /* A stub method only has some fields valid (but they are enough
+            to reconstruct the rest of the fields).  */
          unsigned int is_stub : 1;
+
+         /* Unused.  */
          unsigned int dummy : 3;
 
          /* Index into that baseclass's virtual function table,
This page took 0.024073 seconds and 4 git commands to generate.