Rename fprintf_symbol_filtered
[binutils-gdb.git] / gdb / breakpoint.h
index c9048d33816f65dff8ceda04e9100df4144e231c..e412c4d4113ccaab125772debe7b3e3a0a511298 100644 (file)
@@ -1,5 +1,5 @@
 /* Data structures associated with breakpoints in GDB.
-   Copyright (C) 1992-2021 Free Software Foundation, Inc.
+   Copyright (C) 1992-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -587,7 +587,7 @@ struct breakpoint_ops
   int (*breakpoint_hit) (const struct bp_location *bl,
                         const address_space *aspace,
                         CORE_ADDR bp_addr,
-                        const struct target_waitstatus *ws);
+                        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.  */
@@ -948,7 +948,7 @@ extern bpstat *bpstat_copy (bpstat *);
 
 extern bpstat *build_bpstat_chain (const address_space *aspace,
                                  CORE_ADDR bp_addr,
-                                 const struct target_waitstatus *ws);
+                                 const target_waitstatus &ws);
 
 /* Get a bpstat associated with having just stopped at address
    BP_ADDR in thread PTID.  STOP_CHAIN may be supplied as a previously
@@ -968,13 +968,31 @@ extern bpstat *build_bpstat_chain (const address_space *aspace,
    several reasons concurrently.)
 
    Each element of the chain has valid next, breakpoint_at,
-   commands, FIXME??? fields.  */
+   commands, FIXME??? fields.
+
+   watchpoints_triggered must be called beforehand to set up each
+   watchpoint's watchpoint_triggered value.
+
+*/
 
 extern bpstat *bpstat_stop_status (const address_space *aspace,
                                  CORE_ADDR pc, thread_info *thread,
-                                 const struct target_waitstatus *ws,
+                                 const target_waitstatus &ws,
                                  bpstat *stop_chain = nullptr);
+
+/* Like bpstat_stop_status, but clears all watchpoints'
+   watchpoint_triggered flag.  Unlike with bpstat_stop_status, there's
+   no need to call watchpoint_triggered beforehand.  You'll typically
+   use this variant when handling a known-non-watchpoint event, like a
+   fork or exec event.  */
+
+extern bpstat *bpstat_stop_status_nowatch (const address_space *aspace,
+                                          CORE_ADDR bp_addr,
+                                          thread_info *thread,
+                                          const target_waitstatus &ws);
 \f
+
+
 /* This bpstat_what stuff tells wait_for_inferior what to do with a
    breakpoint (a challenging task).
 
@@ -1607,9 +1625,10 @@ extern void insert_single_step_breakpoint (struct gdbarch *,
    otherwise, return false.  */
 extern int insert_single_step_breakpoints (struct gdbarch *);
 
-/* Check if any hardware watchpoints have triggered, according to the
-   target.  */
-int watchpoints_triggered (struct target_waitstatus *);
+/* Check whether any hardware watchpoints have triggered or not,
+   according to the target, and record it in each watchpoint's
+   'watchpoint_triggered' field.  */
+int watchpoints_triggered (const target_waitstatus &);
 
 /* Helper for transparent breakpoint hiding for memory read and write
    routines.
@@ -1745,7 +1764,7 @@ const std::vector<bp_location *> &all_bp_locations ();
 
 extern int pc_at_non_inline_function (const address_space *aspace,
                                      CORE_ADDR pc,
-                                     const struct target_waitstatus *ws);
+                                     const target_waitstatus &ws);
 
 extern int user_breakpoint_p (struct breakpoint *);