Use bool in gdbarch
authorTom Tromey <tom@tromey.com>
Wed, 1 Jun 2022 19:00:11 +0000 (13:00 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 4 Aug 2022 19:28:04 +0000 (13:28 -0600)
This changes gdbarch to use bool for initialized_p.

gdb/arch-utils.c
gdb/gdbarch.c
gdb/gdbarch.py

index 4e55b2797b9bfd949916aefc54211a5cd2481509..e92004f1c93d771842c6209a9a07a78aa7a80669 100644 (file)
@@ -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);
index d4ea5d33c9c234e5ea7ace6f3414e3175119bc8f..800d9196ea70e52517d844c62ca2a706f9f1e10c 100644 (file)
@@ -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;
index bb08081af5ac32905e24964136d9a35e36e14c19..4a0c52207447c377569a0daa432fe27863c80751 100755 (executable)
@@ -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)