Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 1/4] Use bool in gdbarch
Date: Fri, 10 Jun 2022 15:26:54 -0600	[thread overview]
Message-ID: <20220610212657.1170222-2-tom@tromey.com> (raw)
In-Reply-To: <20220610212657.1170222-1-tom@tromey.com>

This changes gdbarch to use bool for initialized_p.
---
 gdb/arch-utils.c | 2 +-
 gdb/gdbarch.py   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index ff946ee3767..d6834c5a1f5 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -1540,7 +1540,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.py b/gdb/gdbarch.py
index 8956a9c38aa..0b084d568cb 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)
-- 
2.34.1


  reply	other threads:[~2022-06-10 21:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 21:26 [PATCH 0/4] Rewrite gdbarch registry Tom Tromey
2022-06-10 21:26 ` Tom Tromey [this message]
2022-06-13 14:12   ` [PATCH 1/4] Use bool in gdbarch John Baldwin
2022-06-14  0:06     ` Tom Tromey
2022-06-10 21:26 ` [PATCH 2/4] Use new and delete for gdbarch Tom Tromey
2022-06-10 21:26 ` [PATCH 3/4] Allow registry to refer to const types Tom Tromey
2022-06-10 21:26 ` [PATCH 4/4] Use registry in gdbarch Tom Tromey
2022-08-04 19:24 ` [PATCH 0/4] Rewrite gdbarch registry Tom Tromey
2022-08-05 16:50   ` Tsukasa OI via Gdb-patches

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=20220610212657.1170222-2-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@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: 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