+/* An instance of this type is used to represent a watchpoint. It
+ includes a "struct breakpoint" as a kind of base class; users
+ downcast to "struct breakpoint *" when needed. */
+
+struct watchpoint
+{
+ /* The base class. */
+ struct breakpoint base;
+
+ /* String form of exp to use for displaying to the user (malloc'd),
+ or NULL if none. */
+ char *exp_string;
+ /* String form to use for reparsing of EXP (malloc'd) or NULL. */
+ char *exp_string_reparse;
+
+ /* The expression we are watching, or NULL if not a watchpoint. */
+ struct expression *exp;
+ /* The largest block within which it is valid, or NULL if it is
+ valid anywhere (e.g. consists just of global symbols). */
+ const struct block *exp_valid_block;
+ /* The conditional expression if any. */
+ struct expression *cond_exp;
+ /* The largest block within which it is valid, or NULL if it is
+ valid anywhere (e.g. consists just of global symbols). */
+ const struct block *cond_exp_valid_block;
+ /* Value of the watchpoint the last time we checked it, or NULL when
+ we do not know the value yet or the value was not readable. VAL
+ is never lazy. */
+ struct value *val;
+ /* Nonzero if VAL is valid. If VAL_VALID is set but VAL is NULL,
+ then an error occurred reading the value. */
+ int val_valid;
+
+ /* When watching the location of a bitfield, contains the offset and size of
+ the bitfield. Otherwise contains 0. */
+ int val_bitpos;
+ int val_bitsize;
+
+ /* Holds the frame address which identifies the frame this
+ watchpoint should be evaluated in, or `null' if the watchpoint
+ should be evaluated on the outermost frame. */
+ struct frame_id watchpoint_frame;
+
+ /* Holds the thread which identifies the frame this watchpoint
+ should be considered in scope for, or `null_ptid' if the
+ watchpoint should be evaluated in all threads. */
+ ptid_t watchpoint_thread;
+
+ /* For hardware watchpoints, the triggered status according to the
+ hardware. */
+ enum watchpoint_triggered watchpoint_triggered;
+
+ /* Whether this watchpoint is exact (see
+ target_exact_watchpoints). */
+ int exact;
+
+ /* The mask address for a masked hardware watchpoint. */
+ CORE_ADDR hw_wp_mask;
+};
+
+/* Given a function FUNC (struct breakpoint *B, void *DATA) and
+ USER_DATA, call FUNC for every known breakpoint passing USER_DATA
+ as argument.
+
+ If FUNC returns 1, the loop stops and the current
+ 'struct breakpoint' being processed is returned. If FUNC returns
+ zero, the loop continues.
+
+ This function returns either a 'struct breakpoint' pointer or NULL.
+ It was based on BFD's bfd_sections_find_if function. */
+
+extern struct breakpoint *breakpoint_find_if
+ (int (*func) (struct breakpoint *b, void *d), void *user_data);
+
+/* Return true if BPT is either a software breakpoint or a hardware
+ breakpoint. */
+
+extern int is_breakpoint (const struct breakpoint *bpt);
+
+/* Returns true if BPT is really a watchpoint. */
+
+extern int is_watchpoint (const struct breakpoint *bpt);
+
+/* An instance of this type is used to represent all kinds of
+ tracepoints. It includes a "struct breakpoint" as a kind of base
+ class; users downcast to "struct breakpoint *" when needed. */
+
+struct tracepoint
+{
+ /* The base class. */
+ struct breakpoint base;
+
+ /* Number of times this tracepoint should single-step and collect
+ additional data. */
+ long step_count;
+
+ /* Number of times this tracepoint should be hit before
+ disabling/ending. */
+ int pass_count;
+
+ /* The number of the tracepoint on the target. */
+ int number_on_target;
+
+ /* The total space taken by all the trace frames for this
+ tracepoint. */
+ ULONGEST traceframe_usage;
+
+ /* The static tracepoint marker id, if known. */
+ char *static_trace_marker_id;
+
+ /* LTTng/UST allow more than one marker with the same ID string,
+ although it unadvised because it confuses tools. When setting
+ static tracepoints by marker ID, this will record the index in
+ 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;
+};
+