public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Use bool in gdbarch Date: Thu, 4 Aug 2022 19:33:39 +0000 (GMT) [thread overview] Message-ID: <20220804193339.629683858407@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0655397b573d93fe543d6ec4bd0e00e8b3ff5d81 commit 0655397b573d93fe543d6ec4bd0e00e8b3ff5d81 Author: Tom Tromey <tom@tromey.com> Date: Wed Jun 1 13:00:11 2022 -0600 Use bool in gdbarch This changes gdbarch to use bool for initialized_p. Diff: --- gdb/arch-utils.c | 2 +- gdb/gdbarch.c | 2 +- gdb/gdbarch.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 4e55b2797b9..e92004f1c93 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -1542,7 +1542,7 @@ gdbarch_find_by_info (struct gdbarch_info info) any post init values. */ new_gdbarch->dump_tdep = rego->dump_tdep; verify_gdbarch (new_gdbarch); - new_gdbarch->initialized_p = 1; + new_gdbarch->initialized_p = true; if (gdbarch_debug) gdbarch_dump (new_gdbarch, gdb_stdlog); diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index d4ea5d33c9c..800d9196ea7 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -30,7 +30,7 @@ struct gdbarch { /* Has this architecture been fully initialized? */ - int initialized_p; + bool initialized_p; /* An obstack bound to the lifetime of the architecture. */ struct obstack *obstack; diff --git a/gdb/gdbarch.py b/gdb/gdbarch.py index bb08081af5a..4a0c5220744 100755 --- a/gdb/gdbarch.py +++ b/gdb/gdbarch.py @@ -257,7 +257,7 @@ with open("gdbarch.c", "w") as f: print("struct gdbarch", file=f) print("{", file=f) print(" /* Has this architecture been fully initialized? */", file=f) - print(" int initialized_p;", file=f) + print(" bool initialized_p;", file=f) print(file=f) print(" /* An obstack bound to the lifetime of the architecture. */", file=f) print(" struct obstack *obstack;", file=f)
reply other threads:[~2022-08-04 19:33 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220804193339.629683858407@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).