aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>2001-12-12 02:11:52 +0000
committerFred Fish <fnf@specifix.com>2001-12-12 02:11:52 +0000
commit74a9bb82c55f8d399894d5b3525572c17c3a0312 (patch)
tree21cf7847428158465650b87b4a98c4510ef0513d /gdb
parente9e79dd9fc61097942b74f385503cda31ca39127 (diff)
downloadgdb-74a9bb82c55f8d399894d5b3525572c17c3a0312.zip
gdb-74a9bb82c55f8d399894d5b3525572c17c3a0312.tar.gz
gdb-74a9bb82c55f8d399894d5b3525572c17c3a0312.tar.bz2
Approved by Jim Blandy:
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog23
-rw-r--r--gdb/c-typeprint.c2
-rw-r--r--gdb/ch-typeprint.c2
-rw-r--r--gdb/ch-valprint.c2
-rw-r--r--gdb/d10v-tdep.c4
-rw-r--r--gdb/dwarf2read.c2
-rw-r--r--gdb/dwarfread.c2
-rw-r--r--gdb/gdbtypes.c10
-rw-r--r--gdb/jv-typeprint.c2
-rw-r--r--gdb/p-typeprint.c2
-rw-r--r--gdb/p-valprint.c2
-rw-r--r--gdb/stabsread.c6
-rw-r--r--gdb/valops.c4
-rw-r--r--gdb/valprint.c2
14 files changed, 43 insertions, 22 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ee86924..9a39c5c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,28 @@
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.
(recursive_dump_type): Print type struct code values
TYPE_CODE_BITSTRING, TYPE_CODE_COMPLEX, TYPE_CODE_TEMPLATE,
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index c830029..aa7f5a5 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -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");
diff --git a/gdb/ch-typeprint.c b/gdb/ch-typeprint.c
index 339dd0b..011bd12 100644
--- a/gdb/ch-typeprint.c
+++ b/gdb/ch-typeprint.c
@@ -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");
}
diff --git a/gdb/ch-valprint.c b/gdb/ch-valprint.c
index 77109b5..44b1c53 100644
--- a/gdb/ch-valprint.c
+++ b/gdb/ch-valprint.c
@@ -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);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index 3002444..fa55d46 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -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);
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index aab1d46..7c78eb5 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -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);
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index 6eb0a0b..3fdfd1c 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -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)
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index a46f9ce..4a4ff1e 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -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
diff --git a/gdb/jv-typeprint.c b/gdb/jv-typeprint.c
index c0d9ec9..893082c 100644
--- a/gdb/jv-typeprint.c
+++ b/gdb/jv-typeprint.c
@@ -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");
diff --git a/gdb/p-typeprint.c b/gdb/p-typeprint.c
index 0facebf..3a72e40 100644
--- a/gdb/p-typeprint.c
+++ b/gdb/p-typeprint.c
@@ -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");
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index 29503a0..3cad5f8 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -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);
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 7b68242..620634a 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -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;
diff --git a/gdb/valops.c b/gdb/valops.c
index 980a98a..4e14b09 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -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
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 21f681d..ad6a992 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -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);