From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 629683858407; Thu, 4 Aug 2022 19:33:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 629683858407 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Use bool in gdbarch X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 367dda85965bc03968edb43b2c86a2c25d3e846b X-Git-Newrev: 0655397b573d93fe543d6ec4bd0e00e8b3ff5d81 Message-Id: <20220804193339.629683858407@sourceware.org> Date: Thu, 4 Aug 2022 19:33:39 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2022 19:33:39 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D0655397b573d= 93fe543d6ec4bd0e00e8b3ff5d81 commit 0655397b573d93fe543d6ec4bd0e00e8b3ff5d81 Author: Tom Tromey Date: Wed Jun 1 13:00:11 2022 -0600 Use bool in gdbarch =20 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 =3D rego->dump_tdep; verify_gdbarch (new_gdbarch); - new_gdbarch->initialized_p =3D 1; + new_gdbarch->initialized_p =3D true; =20 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; =20 /* 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=3Df) print("{", file=3Df) print(" /* Has this architecture been fully initialized? */", file= =3Df) - print(" int initialized_p;", file=3Df) + print(" bool initialized_p;", file=3Df) print(file=3Df) print(" /* An obstack bound to the lifetime of the architecture. */"= , file=3Df) print(" struct obstack *obstack;", file=3Df)