summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>2001-12-10 06:23:21 +0000
committerFred Fish <fnf@specifix.com>2001-12-10 06:23:21 +0000
commite37c76668d539dbc0d70beeda252e6ba0d6fdf92 (patch)
tree58eece24a4ed25db43be5f8613f04e7af50dc9c8
parent9e38e2daf7d8cbe06b46c61d7b89c4964b063cef (diff)
downloadgdb-e37c76668d539dbc0d70beeda252e6ba0d6fdf92.tar.gz
Approved by Jim Blandy:
2001-12-09 Fred Fish <fnf@redhat.com> * gdbtypes.c (TYPE_FLAG_UNSIGNED, TYPE_FLAG_STUB): Use TYPE_UNSIGNED and TYPE_NOSIGN to determine when to print these rather than testing the bits directly. (TYPE_FLAG_NOSIGN, TYPE_FLAG_TARGET_STUB, TYPE_FLAG_STATIC, TYPE_FLAG_CONST, TYPE_FLAG_VOLATILE, TYPE_FLAG_PROTOTYPED, TYPE_FLAG_INCOMPLETE, TYPE_FLAG_CODE_SPACE, TYPE_FLAG_DATA_SPACE, TYPE_FLAG_VARARGS): Test for and print these bits as well.
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/gdbtypes.c44
2 files changed, 52 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 473c0e34027..3910a0224e5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
2001-12-09 Fred Fish <fnf@redhat.com>
+ * gdbtypes.c (TYPE_FLAG_UNSIGNED, TYPE_FLAG_STUB): Use
+ TYPE_UNSIGNED and TYPE_NOSIGN to determine when to print these
+ rather than testing the bits directly.
+ (TYPE_FLAG_NOSIGN, TYPE_FLAG_TARGET_STUB, TYPE_FLAG_STATIC,
+ TYPE_FLAG_CONST, TYPE_FLAG_VOLATILE, TYPE_FLAG_PROTOTYPED,
+ TYPE_FLAG_INCOMPLETE, TYPE_FLAG_CODE_SPACE, TYPE_FLAG_DATA_SPACE,
+ TYPE_FLAG_VARARGS): Test for and print these bits as well.
+
+2001-12-09 Fred Fish <fnf@redhat.com>
+
* gdbtypes.c (build_gdbtypes): For builtin_type_char, pass
TYPE_FLAG_NOSIGN to init_type() rather than setting it after the
type is created.
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 9309495fe6e..9a276d30cc2 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -2844,14 +2844,54 @@ recursive_dump_type (struct type *type, int spaces)
gdb_print_host_address (TYPE_REFERENCE_TYPE (type), gdb_stdout);
printf_filtered ("\n");
printfi_filtered (spaces, "flags 0x%x", TYPE_FLAGS (type));
- if (TYPE_FLAGS (type) & TYPE_FLAG_UNSIGNED)
+ if (TYPE_UNSIGNED (type))
{
puts_filtered (" TYPE_FLAG_UNSIGNED");
}
- if (TYPE_FLAGS (type) & TYPE_FLAG_STUB)
+ if (TYPE_NOSIGN (type))
+ {
+ puts_filtered (" TYPE_FLAG_NOSIGN");
+ }
+ if (TYPE_STUB (type))
{
puts_filtered (" TYPE_FLAG_STUB");
}
+ if (TYPE_TARGET_STUB (type))
+ {
+ puts_filtered (" TYPE_FLAG_TARGET_STUB");
+ }
+ if (TYPE_STATIC (type))
+ {
+ puts_filtered (" TYPE_FLAG_STATIC");
+ }
+ if (TYPE_CONST (type))
+ {
+ puts_filtered (" TYPE_FLAG_CONST");
+ }
+ if (TYPE_VOLATILE (type))
+ {
+ puts_filtered (" TYPE_FLAG_VOLATILE");
+ }
+ if (TYPE_PROTOTYPED (type))
+ {
+ puts_filtered (" TYPE_FLAG_PROTOTYPED");
+ }
+ if (TYPE_INCOMPLETE (type))
+ {
+ puts_filtered (" TYPE_FLAG_INCOMPLETE");
+ }
+ if (TYPE_CODE_SPACE (type))
+ {
+ puts_filtered (" TYPE_FLAG_CODE_SPACE");
+ }
+ if (TYPE_DATA_SPACE (type))
+ {
+ puts_filtered (" TYPE_FLAG_DATA_SPACE");
+ }
+ if (TYPE_VARARGS (type))
+ {
+ puts_filtered (" TYPE_FLAG_VARARGS");
+ }
puts_filtered ("\n");
printfi_filtered (spaces, "nfields %d ", TYPE_NFIELDS (type));
gdb_print_host_address (TYPE_FIELDS (type), gdb_stdout);