From b68f26dea78f1a390084a0e2bfa95f1bcf1942dc Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 1 May 2022 21:02:01 -0600 Subject: [PATCH] Add initializers to tracepoint 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. --- 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 /* Number of times this tracepoint should single-step and collect additional data. */ - long step_count; + long step_count = 0; /* Number of times this tracepoint should be hit before disabling/ending. */ - int pass_count; + int pass_count = 0; /* The number of the tracepoint on the target. */ - int number_on_target; + int number_on_target = 0; /* The total space taken by all the trace frames for this tracepoint. */ - ULONGEST traceframe_usage; + ULONGEST traceframe_usage = 0; /* 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 = 0; }; -- 2.30.2