Approved by Jim Blandy:
authorFred Fish <fnf@specifix.com>
Wed, 12 Dec 2001 02:11:52 +0000 (02:11 +0000)
committerFred Fish <fnf@specifix.com>
Wed, 12 Dec 2001 02:11:52 +0000 (02:11 +0000)
2001-12-11  Fred Fish  <fnf@redhat.com>
* c-typeprint.c (c_type_print_base): Use type flags access macros
to test bits.
* ch-typeprint.c (chill_type_print_base): Ditto.
* ch-valprint.c (chill_val_print): Ditto.
* d10v-tdep.c (d10v_pointer_to_address): Ditto.
* dwarf2read.c (dwarf2_add_member_fn): Ditto.
* dwarfread.c (read_structure_scope): Ditto.
* gdbtypes.c (create_range_type): Dittol
(create_set_type): Ditto.
(check_typedef): Ditto.
* jv-typeprint.c (java_type_print_base): Ditto.
* p-typeprint.c (pascal_type_print_base): Ditto
* p-valprint.c (pascal_val_print): Ditto.
* stabsread.c (read_cfront_member_functions): Ditto.
(read_member_functions): Ditto.
(cleanup_undefined_types): Ditto.
* valprint.c (val_print): Ditto.
* valops.c (hand_function_call): Remove is_prototyped
variable and just use type flag test macro directly.

14 files changed:
gdb/ChangeLog
gdb/c-typeprint.c
gdb/ch-typeprint.c
gdb/ch-valprint.c
gdb/d10v-tdep.c
gdb/dwarf2read.c
gdb/dwarfread.c
gdb/gdbtypes.c
gdb/jv-typeprint.c
gdb/p-typeprint.c
gdb/p-valprint.c
gdb/stabsread.c
gdb/valops.c
gdb/valprint.c

index ee86924cfb948f1601d4dda7826e70d410f9d4a0..9a39c5c2f5822b7a111a46e71bb5767f9872ae2c 100644 (file)
@@ -1,3 +1,26 @@
+2001-12-11  Fred Fish  <fnf@redhat.com>
+
+       * c-typeprint.c (c_type_print_base): Use type flags access macros
+       to test bits.
+       * ch-typeprint.c (chill_type_print_base): Ditto.
+       * ch-valprint.c (chill_val_print): Ditto.
+       * d10v-tdep.c (d10v_pointer_to_address): Ditto.
+       * dwarf2read.c (dwarf2_add_member_fn): Ditto.
+       * dwarfread.c (read_structure_scope): Ditto.
+       * gdbtypes.c (create_range_type): Dittol
+       (create_set_type): Ditto.
+       (check_typedef): Ditto.
+       * jv-typeprint.c (java_type_print_base): Ditto.
+       * p-typeprint.c (pascal_type_print_base): Ditto
+       * p-valprint.c (pascal_val_print): Ditto.
+       * stabsread.c (read_cfront_member_functions): Ditto.
+       (read_member_functions): Ditto.
+       (cleanup_undefined_types): Ditto.
+       * valprint.c (val_print): Ditto.
+
+       * valops.c (hand_function_call): Remove is_prototyped
+       variable and just use type flag test macro directly.
+
 2001-12-11  Fred Fish  <fnf@redhat.com>
 
        * gdbtypes.c (print_bound_type): New function.
index c83002956867b385493e7e43c1652d63d4ab6ca3..aa7f5a5077250d0bbce6da587b00d230907aa83d 100644 (file)
@@ -751,7 +751,7 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show,
          fprintf_filtered (stream, "{\n");
          if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
            {
-             if (TYPE_FLAGS (type) & TYPE_FLAG_STUB)
+             if (TYPE_STUB (type))
                fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
              else
                fprintfi_filtered (level + 4, stream, "<no data fields>\n");
index 339dd0b32d3e34a54183351d00d8beff1fc61be9..011bd125d2a8e76675f4d00ff8fd3e161ac87c36 100644 (file)
@@ -207,7 +207,7 @@ chill_type_print_base (struct type *type, struct ui_file *stream, int show,
          fprintf_filtered (stream, "(\n");
          if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
            {
-             if (TYPE_FLAGS (type) & TYPE_FLAG_STUB)
+             if (TYPE_STUB (type))
                {
                  fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
                }
index 77109b5713bb45f2e9724380bd99a463092d597f..44b1c5343118bdbdc67fb7a1b8c9aa13810bee11 100644 (file)
@@ -335,7 +335,7 @@ chill_val_print (struct type *type, char *valaddr, int embedded_offset,
     case TYPE_CODE_SET:
       elttype = TYPE_INDEX_TYPE (type);
       CHECK_TYPEDEF (elttype);
-      if (TYPE_FLAGS (elttype) & TYPE_FLAG_STUB)
+      if (TYPE_STUB (elttype))
        {
          fprintf_filtered (stream, "<incomplete type>");
          gdb_flush (stream);
index 3002444fe23ca23b5ccc8e8b761f0973918da0a5..fa55d464ef5d4fb152792a2b5b90f748065cfe30 100644 (file)
@@ -430,8 +430,8 @@ d10v_pointer_to_address (struct type *type, void *buf)
 
   /* Is it a code address?  */
   if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC
-      || TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD ||
-      (TYPE_FLAGS (TYPE_TARGET_TYPE (type)) & TYPE_FLAG_CODE_SPACE) != 0)
+      || TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD
+      || TYPE_CODE_SPACE (TYPE_TARGET_TYPE (type)))
     return d10v_make_iaddr (addr);
   else
     return d10v_make_daddr (addr);
index aab1d46676b559c455ead48bc87fc20941e6aee0..7c78eb5ad819ad3ce483abf9105fd4ae9be1b45a 100644 (file)
@@ -2134,7 +2134,7 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
        arg_types[iparams] = TYPE_FIELD_TYPE (die->type, iparams);
 
       /* Set last entry in argument type vector.  */
-      if (TYPE_FLAGS (die->type) & TYPE_FLAG_VARARGS)
+      if (TYPE_VARARGS (die->type))
        arg_types[nparams] = NULL;
       else
        arg_types[nparams] = dwarf2_fundamental_type (objfile, FT_VOID);
index 6eb0a0b06ed3d7350537d89ccacaea195a4969a5..3fdfd1ce375ca3d1e22895e15a0392cf50010109 100644 (file)
@@ -1147,7 +1147,7 @@ read_structure_scope (struct dieinfo *dip, char *thisdie, char *enddie,
   struct symbol *sym;
 
   type = struct_type (dip, thisdie, enddie, objfile);
-  if (!(TYPE_FLAGS (type) & TYPE_FLAG_STUB))
+  if (!TYPE_STUB (type))
     {
       sym = new_symbol (dip, objfile);
       if (sym != NULL)
index a46f9ce51a63dab0e7f3b6c19ce55adea9c52146..4a4ff1edf1ea902ff70e3c4180320e1057aaaa54 100644 (file)
@@ -569,7 +569,7 @@ create_range_type (struct type *result_type, struct type *index_type,
     }
   TYPE_CODE (result_type) = TYPE_CODE_RANGE;
   TYPE_TARGET_TYPE (result_type) = index_type;
-  if (TYPE_FLAGS (index_type) & TYPE_FLAG_STUB)
+  if (TYPE_STUB (index_type))
     TYPE_FLAGS (result_type) |= TYPE_FLAG_TARGET_STUB;
   else
     TYPE_LENGTH (result_type) = TYPE_LENGTH (check_typedef (index_type));
@@ -732,7 +732,7 @@ create_set_type (struct type *result_type, struct type *domain_type)
     TYPE_ALLOC (result_type, 1 * sizeof (struct field));
   memset (TYPE_FIELDS (result_type), 0, sizeof (struct field));
 
-  if (!(TYPE_FLAGS (domain_type) & TYPE_FLAG_STUB))
+  if (!TYPE_STUB (domain_type))
     {
       if (get_discrete_bounds (domain_type, &low_bound, &high_bound) < 0)
        low_bound = high_bound = 0;
@@ -1245,7 +1245,7 @@ check_typedef (struct type *type)
        make_cv_type (is_const, is_volatile, newtype, &type);
     }
   /* Otherwise, rely on the stub flag being set for opaque/stubbed types */
-  else if ((TYPE_FLAGS (type) & TYPE_FLAG_STUB) && !currently_reading_symtab)
+  else if (TYPE_STUB (type) && !currently_reading_symtab)
     {
       char *name = type_name_no_tag (type);
       /* FIXME: shouldn't we separately check the TYPE_NAME and the
@@ -1263,12 +1263,12 @@ check_typedef (struct type *type)
        make_cv_type (is_const, is_volatile, SYMBOL_TYPE (sym), &type);
     }
 
-  if (TYPE_FLAGS (type) & TYPE_FLAG_TARGET_STUB)
+  if (TYPE_TARGET_STUB (type))
     {
       struct type *range_type;
       struct type *target_type = check_typedef (TYPE_TARGET_TYPE (type));
 
-      if (TYPE_FLAGS (target_type) & (TYPE_FLAG_STUB | TYPE_FLAG_TARGET_STUB))
+      if (TYPE_STUB (target_type) || TYPE_TARGET_STUB (target_type))
        {
        }
       else if (TYPE_CODE (type) == TYPE_CODE_ARRAY
index c0d9ec9290354c5c3157c12a63380926a0e9aeb6..893082cc187ebb9e7498024cc670c2bad7c60768 100644 (file)
@@ -152,7 +152,7 @@ java_type_print_base (struct type *type, struct ui_file *stream, int show,
          fprintf_filtered (stream, "{\n");
          if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
            {
-             if (TYPE_FLAGS (type) & TYPE_FLAG_STUB)
+             if (TYPE_STUB (type))
                fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
              else
                fprintfi_filtered (level + 4, stream, "<no data fields>\n");
index 0facebfa9d1c24923db9c7a6793e1439d809773b..3a72e40f24d3b415aa3d24a93afb7b03ba41669d 100644 (file)
@@ -588,7 +588,7 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
          fprintf_filtered (stream, "\n");
          if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
            {
-             if (TYPE_FLAGS (type) & TYPE_FLAG_STUB)
+             if (TYPE_STUB (type))
                fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
              else
                fprintfi_filtered (level + 4, stream, "<no data fields>\n");
index 29503a093e0197da9425c4e54fa053a490568d59..3cad5f84f7059a01a58e9ff2d3ab70c89cc8bacb 100644 (file)
@@ -445,7 +445,7 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset,
     case TYPE_CODE_SET:
       elttype = TYPE_INDEX_TYPE (type);
       CHECK_TYPEDEF (elttype);
-      if (TYPE_FLAGS (elttype) & TYPE_FLAG_STUB)
+      if (TYPE_STUB (elttype))
        {
          fprintf_filtered (stream, "<incomplete type>");
          gdb_flush (stream);
index 7b682427fb4578e0cdfc37745b46a1351de5356a..620634a8d61eb7ffd366c668a5e881eda0fab090 100644 (file)
@@ -869,7 +869,7 @@ read_cfront_member_functions (struct field_info *fip, char **pp,
       TYPE_CODE (new_sublist->fn_field.type) = TYPE_CODE_METHOD;
 
       /* If this is just a stub, then we don't have the real name here. */
-      if (TYPE_FLAGS (new_sublist->fn_field.type) & TYPE_FLAG_STUB)
+      if (TYPE_STUB (new_sublist->fn_field.type))
        {
          if (!TYPE_DOMAIN_TYPE (new_sublist->fn_field.type))
            TYPE_DOMAIN_TYPE (new_sublist->fn_field.type) = type;
@@ -3100,7 +3100,7 @@ read_member_functions (struct field_info *fip, char **pp, struct type *type,
 
          /* If this is just a stub, then we don't have the real name here. */
 
-         if (TYPE_FLAGS (new_sublist->fn_field.type) & TYPE_FLAG_STUB)
+         if (TYPE_STUB (new_sublist->fn_field.type))
            {
              if (!TYPE_DOMAIN_TYPE (new_sublist->fn_field.type))
                TYPE_DOMAIN_TYPE (new_sublist->fn_field.type) = type;
@@ -4941,7 +4941,7 @@ cleanup_undefined_types (void)
               as well as in check_typedef to deal with the (legitimate in
               C though not C++) case of several types with the same name
               in different source files.  */
-           if (TYPE_FLAGS (*type) & TYPE_FLAG_STUB)
+           if (TYPE_STUB (*type))
              {
                struct pending *ppt;
                int i;
index 980a98af54d656a67ca31a132df92c9462764083..4e14b095e173d0c637aeece6efa185c7c806e2eb 100644 (file)
@@ -1458,10 +1458,8 @@ hand_function_call (value_ptr function, int nargs, value_ptr *args)
 
       else
        {
-         int is_prototyped = TYPE_FLAGS (ftype) & TYPE_FLAG_PROTOTYPED;
          param_type = TYPE_FIELD_TYPE (ftype, i);
-
-         args[i] = value_arg_coerce (args[i], param_type, is_prototyped);
+         args[i] = value_arg_coerce (args[i], param_type, TYPE_PROTOTYPED (ftype));
        }
 
       /*elz: this code is to handle the case in which the function to be called
index 21f681d43d797409fdef8e9e28f408625d5377ea..ad6a992b7377a308a8059d7dc470476413490f1c 100644 (file)
@@ -142,7 +142,7 @@ val_print (struct type *type, char *valaddr, int embedded_offset,
      only a stub and we can't find and substitute its complete type, then
      print appropriate string and return.  */
 
-  if (TYPE_FLAGS (real_type) & TYPE_FLAG_STUB)
+  if (TYPE_STUB (real_type))
     {
       fprintf_filtered (stream, "<incomplete type>");
       gdb_flush (stream);