aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-01-16 19:13:55 -0700
committerTom Tromey <tom@tromey.com>2022-04-29 16:14:32 -0600
commitc47614fef9fa278399e0d2818d42b73f0e0a26ec (patch)
tree14735d841ce25ca71cc9eacbc0835eaf2f66ec94 /gdb/breakpoint.h
parentb3316ff1532571a111dcc27f4545640aafbdaffd (diff)
downloadgdb-c47614fef9fa278399e0d2818d42b73f0e0a26ec.zip
gdb-c47614fef9fa278399e0d2818d42b73f0e0a26ec.tar.gz
gdb-c47614fef9fa278399e0d2818d42b73f0e0a26ec.tar.bz2
Remove most fields from breakpoint_ops
At this point, all implementations of breakpoints use the vtable. So, we can now remove most function pointers from breakpoint_ops and switch to using methods directly in the callers. Only the two "static virtual" methods remain in breakpoint_ops.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r--gdb/breakpoint.h93
1 files changed, 0 insertions, 93 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 8b92dc4..93c2a64 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -561,80 +561,6 @@ enum print_stop_action
struct breakpoint_ops
{
- /* Allocate a location for this breakpoint. */
- struct bp_location * (*allocate_location) (struct breakpoint *);
-
- /* Reevaluate a breakpoint. This is necessary after symbols change
- (e.g., an executable or DSO was loaded, or the inferior just
- started). */
- void (*re_set) (struct breakpoint *self);
-
- /* Insert the breakpoint or watchpoint or activate the catchpoint.
- Return 0 for success, 1 if the breakpoint, watchpoint or
- catchpoint type is not supported, -1 for failure. */
- int (*insert_location) (struct bp_location *);
-
- /* Remove the breakpoint/catchpoint that was previously inserted
- with the "insert" method above. Return 0 for success, 1 if the
- breakpoint, watchpoint or catchpoint type is not supported,
- -1 for failure. */
- int (*remove_location) (struct bp_location *, enum remove_bp_reason reason);
-
- /* Return true if it the target has stopped due to hitting
- breakpoint location BL. This function does not check if we
- should stop, only if BL explains the stop. ASPACE is the address
- space in which the event occurred, BP_ADDR is the address at
- which the inferior stopped, and WS is the target_waitstatus
- describing the event. */
- int (*breakpoint_hit) (const struct bp_location *bl,
- const address_space *aspace,
- CORE_ADDR bp_addr,
- const target_waitstatus &ws);
-
- /* Check internal conditions of the breakpoint referred to by BS.
- If we should not stop for this breakpoint, set BS->stop to 0. */
- void (*check_status) (struct bpstat *bs);
-
- /* Tell how many hardware resources (debug registers) are needed
- for this breakpoint. If this function is not provided, then
- the breakpoint or watchpoint needs one debug register. */
- int (*resources_needed) (const struct bp_location *);
-
- /* Tell whether we can downgrade from a hardware watchpoint to a software
- one. If not, the user will not be able to enable the watchpoint when
- there are not enough hardware resources available. */
- int (*works_in_software_mode) (const struct breakpoint *);
-
- /* The normal print routine for this breakpoint, called when we
- hit it. */
- enum print_stop_action (*print_it) (struct bpstat *bs);
-
- /* Display information about this breakpoint, for "info
- breakpoints". Returns false if this method should use the
- default behavior. */
- bool (*print_one) (struct breakpoint *, struct bp_location **);
-
- /* Display extra information about this breakpoint, below the normal
- breakpoint description in "info breakpoints".
-
- In the example below, the "address range" line was printed
- by print_one_detail_ranged_breakpoint.
-
- (gdb) info breakpoints
- Num Type Disp Enb Address What
- 2 hw breakpoint keep y in main at test-watch.c:70
- address range: [0x10000458, 0x100004c7]
-
- */
- void (*print_one_detail) (const struct breakpoint *, struct ui_out *);
-
- /* Display information about this breakpoint after setting it
- (roughly speaking; this is called from "mention"). */
- void (*print_mention) (struct breakpoint *);
-
- /* Print to FP the CLI command that recreates this breakpoint. */
- void (*print_recreate) (struct breakpoint *, struct ui_file *fp);
-
/* Create SALs from location, storing the result in linespec_result.
For an explanation about the arguments, see the function
@@ -659,25 +585,6 @@ struct breakpoint_ops
enum bptype, enum bpdisp, int, int,
int, const struct breakpoint_ops *,
int, int, int, unsigned);
-
- /* Given the location (second parameter), this method decodes it and
- returns the SAL locations related to it. For ordinary
- breakpoints, it calls `decode_line_full'. If SEARCH_PSPACE is
- not NULL, symbol search is restricted to just that program space.
-
- This function is called inside `location_to_sals'. */
- std::vector<symtab_and_line> (*decode_location)
- (struct breakpoint *b,
- struct event_location *location,
- struct program_space *search_pspace);
-
- /* Return true if this breakpoint explains a signal. See
- bpstat_explains_signal. */
- int (*explains_signal) (struct breakpoint *, enum gdb_signal);
-
- /* Called after evaluating the breakpoint's condition,
- and only if it evaluated true. */
- void (*after_condition_true) (struct bpstat *bs);
};
/* Helper for breakpoint_ops->print_recreate implementations. Prints