From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 68832394BE26; Fri, 6 May 2022 18:11:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 68832394BE26 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] Add initializers to tracepoint X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 73063f5180a07b9c8042887cd4cada0b89388556 X-Git-Newrev: b68f26dea78f1a390084a0e2bfa95f1bcf1942dc Message-Id: <20220506181122.68832394BE26@sourceware.org> Date: Fri, 6 May 2022 18:11:22 +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:11:22 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db68f26dea78f= 1a390084a0e2bfa95f1bcf1942dc commit b68f26dea78f1a390084a0e2bfa95f1bcf1942dc Author: Tom Tromey Date: Sun May 1 21:02:01 2022 -0600 Add initializers to tracepoint =20 This adds some initializers to tracepoint. I think right now these may not be needed, due to obscure rules about zero initialization. However, this will change in the next patch, and anyway it is clearer to be explicit. Diff: --- gdb/breakpoint.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 356af45accd..d244e8daec0 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -987,18 +987,18 @@ struct tracepoint : public breakpoint =20 /* Number of times this tracepoint should single-step and collect additional data. */ - long step_count; + long step_count =3D 0; =20 /* Number of times this tracepoint should be hit before disabling/ending. */ - int pass_count; + int pass_count =3D 0; =20 /* The number of the tracepoint on the target. */ - int number_on_target; + int number_on_target =3D 0; =20 /* The total space taken by all the trace frames for this tracepoint. */ - ULONGEST traceframe_usage; + ULONGEST traceframe_usage =3D 0; =20 /* The static tracepoint marker id, if known. */ std::string static_trace_marker_id; @@ -1009,7 +1009,7 @@ struct tracepoint : public breakpoint the array of markers we found for the given marker ID for which this static tracepoint corresponds. When resetting breakpoints, we will use this index to try to find the same marker again. */ - int static_trace_marker_id_idx; + int static_trace_marker_id_idx =3D 0; };