gdb/mi: make current_token a field of mi_interp
[binutils-gdb.git] / gdb / breakpoint.h
index 709d27fa4db846df86dab7ab39ecb5a6deab6a1e..1a73d08a88723093706b816fd8a1058d4d9e6258 100644 (file)
@@ -509,6 +509,10 @@ public:
 
   /* The objfile the symbol or minimal symbol were found in.  */
   const struct objfile *objfile = NULL;
+
+  /* Return a string representation of the bp_location.
+     This is only meant to be used in debug messages.  */
+  std::string to_string () const;
 };
 
 /* A policy class for bp_location reference counting.  */
@@ -579,7 +583,7 @@ struct breakpoint_ops
                                  struct linespec_result *,
                                  gdb::unique_xmalloc_ptr<char>,
                                  gdb::unique_xmalloc_ptr<char>,
-                                 enum bptype, enum bpdisp, int, int,
+                                 enum bptype, enum bpdisp, int, int, int,
                                  int, int, int, int, unsigned);
 };
 
@@ -859,6 +863,10 @@ struct breakpoint : public intrusive_list_node<breakpoint>
      care.  */
   int thread = -1;
 
+  /* Inferior number for inferior-specific breakpoint, or -1 if this
+     breakpoint is for all inferiors.  */
+  int inferior = -1;
+
   /* Ada task number for task-specific breakpoint, or -1 if don't
      care.  */
   int task = -1;
@@ -917,7 +925,7 @@ struct code_breakpoint : public breakpoint
                   gdb::unique_xmalloc_ptr<char> cond_string,
                   gdb::unique_xmalloc_ptr<char> extra_string,
                   enum bpdisp disposition,
-                  int thread, int task, int ignore_count,
+                  int thread, int task, int inferior, int ignore_count,
                   int from_tty,
                   int enabled, unsigned flags,
                   int display_canonical);
@@ -1597,6 +1605,7 @@ enum breakpoint_create_flags
 extern int create_breakpoint (struct gdbarch *gdbarch,
                              struct location_spec *locspec,
                              const char *cond_string, int thread,
+                             int inferior,
                              const char *extra_string,
                              bool force_condition,
                              int parse_extra,
@@ -1740,6 +1749,11 @@ extern void breakpoint_set_silent (struct breakpoint *b, int silent);
 
 extern void breakpoint_set_thread (struct breakpoint *b, int thread);
 
+/* Set the inferior for breakpoint B to INFERIOR.  If INFERIOR is -1, make
+   the breakpoint work for any inferior.  */
+
+extern void breakpoint_set_inferior (struct breakpoint *b, int inferior);
+
 /* Set the task for this breakpoint.  If TASK is -1, make the breakpoint
    work for any task.  Passing a value other than -1 for TASK should only
    be done if b->thread is -1; it is not valid to try and set both a thread
@@ -2007,4 +2021,9 @@ extern void describe_other_breakpoints (struct gdbarch *,
 
 extern void enable_disable_bp_location (bp_location *loc, bool enable);
 
+
+/* Notify interpreters and observers that breakpoint B was modified.  */
+
+extern void notify_breakpoint_modified (breakpoint *b);
+
 #endif /* !defined (BREAKPOINT_H) */