From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 6D764395200F; Fri, 6 May 2022 18:10:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D764395200F 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] Boolify breakpoint::explains_signal X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 9efa3c7fa3654c91d638fc9705ecd61c465c8000 X-Git-Newrev: a6860f3ad2d0ee89ee8b4a7f257b7fdcac84b5c4 Message-Id: <20220506181011.6D764395200F@sourceware.org> Date: Fri, 6 May 2022 18:10:11 +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: Fri, 06 May 2022 18:10:11 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Da6860f3ad2d0= ee89ee8b4a7f257b7fdcac84b5c4 commit a6860f3ad2d0ee89ee8b4a7f257b7fdcac84b5c4 Author: Tom Tromey Date: Sat Apr 30 08:04:30 2022 -0600 Boolify breakpoint::explains_signal =20 This changes breakpoint::explains_signal to return bool. Diff: --- gdb/break-catch-sig.c | 6 +++--- gdb/breakpoint.c | 6 +++--- gdb/breakpoint.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gdb/break-catch-sig.c b/gdb/break-catch-sig.c index 8f6d3967718..7f73b9e5981 100644 --- a/gdb/break-catch-sig.c +++ b/gdb/break-catch-sig.c @@ -51,7 +51,7 @@ struct signal_catchpoint : public breakpoint bool print_one (struct bp_location **) override; void print_mention () override; void print_recreate (struct ui_file *fp) override; - int explains_signal (enum gdb_signal) override; + bool explains_signal (enum gdb_signal) override; =20 /* Signal numbers used for the 'catch signal' feature. If no signal has been specified for filtering, it is empty. Otherwise, @@ -297,10 +297,10 @@ signal_catchpoint::print_recreate (struct ui_file *fp) =20 /* Implement the "explains_signal" method for signal catchpoints. */ =20 -int +bool signal_catchpoint::explains_signal (enum gdb_signal sig) { - return 1; + return true; } =20 /* Create a new signal catchpoint. TEMPFLAG is true if this should be diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 7e8fae92ffb..2521e95ce70 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -9716,15 +9716,15 @@ watchpoint::print_recreate (struct ui_file *fp) =20 /* Implement the "explains_signal" method for watchpoints. */ =20 -int +bool watchpoint::explains_signal (enum gdb_signal sig) { /* A software watchpoint cannot cause a signal other than GDB_SIGNAL_TRAP. */ if (type =3D=3D bp_watchpoint && sig !=3D GDB_SIGNAL_TRAP) - return 0; + return false; =20 - return 1; + return true; } =20 struct masked_watchpoint : public watchpoint diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index b0ca4e98eb4..ec3a8309b51 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -721,9 +721,9 @@ struct breakpoint =20 /* Return true if this breakpoint explains a signal. See bpstat_explains_signal. */ - virtual int explains_signal (enum gdb_signal) + virtual bool explains_signal (enum gdb_signal) { - return 1; + return true; } =20 /* Called after evaluating the breakpoint's condition, @@ -882,7 +882,7 @@ struct watchpoint : public breakpoint enum print_stop_action print_it (struct bpstat *bs) override; void print_mention () override; void print_recreate (struct ui_file *fp) override; - int explains_signal (enum gdb_signal) override; + bool explains_signal (enum gdb_signal) override; =20 /* String form of exp to use for displaying to the user (malloc'd), or NULL if none. */