2011-11-01 Justin Lebar <justin.lebar@gmail.com>
[deliverable/binutils-gdb.git] / gdb / breakpoint.h
index d31806073700fa39b363ba15de8fd7e500b7779c..c2116e2fdf9b5d3c600972f65c8f515c48a0cae4 100644 (file)
@@ -482,6 +482,15 @@ struct breakpoint_ops
   void (*print_recreate) (struct breakpoint *, struct ui_file *fp);
 };
 
+/* Helper for breakpoint_ops->print_recreate implementations.  Prints
+   the "thread" or "task" condition of B, and then a newline.
+
+   Necessary because most breakpoint implementations accept
+   thread/task conditions at the end of the spec line, like "break foo
+   thread 1", which needs outputting before any breakpoint-type
+   specific extra command necessary for B's recreation.  */
+extern void print_recreate_thread (struct breakpoint *b, struct ui_file *fp);
+
 enum watchpoint_triggered
 {
   /* This watchpoint definitely did not trigger.  */
@@ -524,7 +533,7 @@ extern int target_exact_watchpoints;
 struct breakpoint
   {
     /* Methods associated with this breakpoint.  */
-    struct breakpoint_ops *ops;
+    const struct breakpoint_ops *ops;
 
     struct breakpoint *next;
     /* Type of breakpoint.  */
@@ -610,29 +619,6 @@ struct breakpoint
        the condition in.  */
     int condition_not_parsed;
 
-    /* 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 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;
-
     /* With a Python scripting enabled GDB, store a reference to the
        Python object that has been associated with this breakpoint.
        This is always NULL for a GDB that is not script enabled.  It
@@ -700,6 +686,38 @@ struct 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 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;
+};
+
 typedef struct breakpoint *breakpoint_p;
 DEF_VEC_P(breakpoint_p);
 \f
@@ -877,8 +895,9 @@ extern int bpstat_num (bpstat *, int *);
    command loop).  */
 extern void bpstat_do_actions (void);
 
-/* Modify BS so that the actions will not be performed.  */
-extern void bpstat_clear_actions (bpstat);
+/* Modify all entries of STOP_BPSTAT of INFERIOR_PTID so that the actions will
+   not be performed.  */
+extern void bpstat_clear_actions (void);
 
 /* Implementation:  */
 
@@ -932,10 +951,6 @@ struct bpstats
     /* The associated command list.  */
     struct counted_command_line *commands;
 
-    /* Commands left to be done.  This points somewhere in
-       base_command.  */
-    struct command_line *commands_left;
-
     /* Old value associated with a watchpoint.  */
     struct value *old_val;
 
@@ -1075,7 +1090,7 @@ extern void
                                 struct gdbarch *gdbarch,
                                 struct symtab_and_line sal,
                                 char *addr_string,
-                                struct breakpoint_ops *ops,
+                                const struct breakpoint_ops *ops,
                                 int tempflag,
                                 int from_tty);
 
@@ -1092,7 +1107,7 @@ extern int create_breakpoint (struct gdbarch *gdbarch, char *arg,
                              int tempflag, enum bptype wanted_type,
                              int ignore_count,
                              enum auto_boolean pending_break_support,
-                             struct breakpoint_ops *ops,
+                             const struct breakpoint_ops *ops,
                              int from_tty,
                              int enabled,
                              int internal);
@@ -1301,12 +1316,12 @@ extern int catch_syscall_enabled (void);
 extern int catching_syscall_number (int syscall_number);
 
 /* Return a tracepoint with the given number if found.  */
-extern struct breakpoint *get_tracepoint (int num);
+extern struct tracepoint *get_tracepoint (int num);
 
-extern struct breakpoint *get_tracepoint_by_number_on_target (int num);
+extern struct tracepoint *get_tracepoint_by_number_on_target (int num);
 
 /* Find a tracepoint by parsing a number in the supplied string.  */
-extern struct breakpoint *
+extern struct tracepoint *
      get_tracepoint_by_number (char **arg, 
                               struct get_number_or_range_state *state,
                               int optional_p);
@@ -1342,6 +1357,12 @@ extern void end_rbreak_breakpoints (void);
 extern struct breakpoint *iterate_over_breakpoints (int (*) (struct breakpoint *,
                                                             void *), void *);
 
+/* Nonzero if the specified PC cannot be a location where functions
+   have been inlined.  */
+
+extern int pc_at_non_inline_function (struct address_space *aspace,
+                                     CORE_ADDR pc);
+
 extern int user_breakpoint_p (struct breakpoint *);
 
 #endif /* !defined (BREAKPOINT_H) */
This page took 0.027113 seconds and 4 git commands to generate.