aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r--gdb/breakpoint.h37
1 files changed, 23 insertions, 14 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 77b754f..cef1d72 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -568,15 +568,15 @@ enum print_stop_action
struct breakpoint_ops
{
- /* Create SALs from location spec, storing the result in
- linespec_result.
-
- For an explanation about the arguments, see the function
- `create_sals_from_location_spec_default'.
+ /* Create SALs from LOCSPEC, storing the result in linespec_result
+ CANONICAL. If SEARCH_PSPACE is not nullptr then only results in the
+ corresponding program space are returned. If SEARCH_PSPACE is nullptr
+ then results for all program spaces are returned.
This function is called inside `create_breakpoint'. */
void (*create_sals_from_location_spec) (location_spec *locspec,
- struct linespec_result *canonical);
+ linespec_result *canonical,
+ program_space *search_pspace);
/* This method will be responsible for creating a breakpoint given its SALs.
Usually, it just calls `create_breakpoints_sal' (for ordinary
@@ -708,10 +708,19 @@ struct breakpoint : public intrusive_list_node<breakpoint>
/* Reevaluate a breakpoint. This is necessary after symbols change
(e.g., an executable or DSO was loaded, or the inferior just
- started). This is pure virtual as, at a minimum, each sub-class must
- recompute any cached condition expressions based off of the
- cond_string member variable. */
- virtual void re_set () = 0;
+ started).
+
+ If not nullptr, then FILTER_PSPACE is the program space in which
+ symbols may have changed, we only need to add new locations in
+ FILTER_PSPACE.
+
+ If FILTER_PSPACE is nullptr then all program spaces may have changed,
+ new locations need to be searched for in every program space.
+
+ This is pure virtual as, at a minimum, each sub-class must recompute
+ any cached condition expressions based off of the cond_string member
+ variable. */
+ virtual void re_set (program_space *filter_pspace) = 0;
/* Insert the breakpoint or watchpoint or activate the catchpoint.
Return 0 for success, 1 if the breakpoint, watchpoint or
@@ -952,7 +961,7 @@ struct code_breakpoint : public breakpoint
/* Add a location for SAL to this breakpoint. */
bp_location *add_location (const symtab_and_line &sal);
- void re_set () override;
+ void re_set (program_space *pspace) override;
int insert_location (struct bp_location *) override;
int remove_location (struct bp_location *,
enum remove_bp_reason reason) override;
@@ -974,7 +983,7 @@ protected:
struct program_space *search_pspace);
/* Helper method that does the basic work of re_set. */
- void re_set_default ();
+ void re_set_default (program_space *pspace);
/* Find the SaL locations corresponding to the given LOCATION.
On return, FOUND will be 1 if any SaL was found, zero otherwise. */
@@ -996,7 +1005,7 @@ struct watchpoint : public breakpoint
{
using breakpoint::breakpoint;
- void re_set () override;
+ void re_set (program_space *pspace) override;
int insert_location (struct bp_location *) override;
int remove_location (struct bp_location *,
enum remove_bp_reason reason) override;
@@ -1140,7 +1149,7 @@ struct catchpoint : public breakpoint
/* If the catchpoint has a condition set then recompute the cached
expression within the single dummy location. */
- void re_set () override;
+ void re_set (program_space *filter_pspace) override;
};