From: Fred Fish <fnf@fishpond.ninemoons.com>
To: gdb-patches@sources.redhat.com
Cc: fnf@redhat.com
Subject: RFA: "maint print type" should print all the flag bits
Date: Sun, 09 Dec 2001 11:14:00 -0000 [thread overview]
Message-ID: <200112091907.fB9J7tM06223@fishpond.ninemoons.com> (raw)
The "maint print type" command does not print all the flag
bits. It also should to use the defined macros to test for
the bits.
-Fred
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.
Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.29
diff -u -p -r1.29 gdbtypes.c
--- gdbtypes.c 2001/12/07 22:11:51 1.29
+++ gdbtypes.c 2001/12/09 19:08:25
@@ -2846,14 +2844,54 @@ recursive_dump_type (struct type *type,
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);
next reply other threads:[~2001-12-09 19:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-09 11:14 Fred Fish [this message]
2001-12-09 19:08 ` Jim Blandy
2001-12-10 1:03 ` Eli Zaretskii
2001-12-10 12:44 ` Jim Blandy
2001-12-11 0:18 ` Eli Zaretskii
[not found] ` <3C162900.288B@redhat.com>
2001-12-11 9:21 ` Eli Zaretskii
2001-12-11 10:59 ` Andrew Cagney
2001-12-11 11:44 ` Daniel Jacobowitz
2001-12-11 17:47 ` Andrew Cagney
2001-12-11 19:14 ` Daniel Jacobowitz
2001-12-12 0:29 ` Eli Zaretskii
2001-12-12 0:29 ` Eli Zaretskii
2001-12-11 10:55 ` Jim Blandy
2001-12-11 11:16 ` Stan Shebs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200112091907.fB9J7tM06223@fishpond.ninemoons.com \
--to=fnf@fishpond.ninemoons.com \
--cc=fnf@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox