aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-05-01 21:02:01 -0600
committerTom Tromey <tom@tromey.com>2022-05-06 12:03:35 -0600
commitb68f26dea78f1a390084a0e2bfa95f1bcf1942dc (patch)
tree805e90c3a3f9a97dbb715c6d3088eeff93e982f8 /gdb
parent73063f5180a07b9c8042887cd4cada0b89388556 (diff)
downloadbinutils-b68f26dea78f1a390084a0e2bfa95f1bcf1942dc.zip
binutils-b68f26dea78f1a390084a0e2bfa95f1bcf1942dc.tar.gz
binutils-b68f26dea78f1a390084a0e2bfa95f1bcf1942dc.tar.bz2
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/breakpoint.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 356af45..d244e8d 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;
};