2000-02-14 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
[deliverable/binutils-gdb.git] / gdb / breakpoint.h
index fb29c84301dba89176eb96ea43bde44d2e561209..f8358a9fa12922ee4045ad0b9383abc2ccbdcb17 100644 (file)
@@ -94,6 +94,16 @@ enum bptype
        dynamic libraries.  */
     bp_shlib_event,
 
+    /* Some multi-threaded systems can arrange for a location in the 
+       inferior to be executed when certain thread-related events occur
+       (such as thread creation or thread death).
+
+       By placing a breakpoint at one of these locations, GDB will get
+       control when these events occur.  GDB can then update its thread
+       lists etc.  */
+
+    bp_thread_event,
+
     /* These breakpoints are used to implement the "catch load" command
        on platforms whose dynamic linkers support such functionality.  */
     bp_catch_load,
@@ -375,6 +385,16 @@ struct bpstat_what
     int call_dummy;
   };
 
+/* The possible return values for print_bpstat, print_it_normal,
+   print_it_done, print_it_noop. */
+enum print_stop_action
+  {
+    PRINT_UNKNOWN = -1,
+    PRINT_SRC_AND_LOC,
+    PRINT_SRC_ONLY,
+    PRINT_NOTHING
+  };
+
 /* Tell what to do about this bpstat.  */
 struct bpstat_what bpstat_what PARAMS ((bpstat));
 \f
@@ -410,7 +430,7 @@ extern int bpstat_have_active_hw_watchpoints PARAMS ((void));
 /* Print a message indicating what happened.  Returns nonzero to
    say that only the source line should be printed after this (zero
    return means print the frame as well as the source line).  */
-extern int bpstat_print PARAMS ((bpstat));
+extern enum print_stop_action bpstat_print PARAMS ((bpstat));
 
 /* Return the breakpoint number of the first breakpoint we are stopped
    at.  *BSP upon return is a bpstat which points to the remaining
@@ -434,6 +454,22 @@ extern void bpstat_clear_actions PARAMS ((bpstat));
 extern void bpstat_get_triggered_catchpoints PARAMS ((bpstat, bpstat *));
 
 /* Implementation:  */
+
+/* Values used to tell the printing routine how to behave for this bpstat. */
+enum bp_print_how
+  {
+    /* This is used when we want to do a normal printing of the reason
+       for stopping. The output will depend on the type of eventpoint
+       we are dealing with. This is the default value, most commonly
+       used. */
+    print_it_normal,
+    /* This is used when nothing should be printed for this bpstat entry.  */
+    print_it_noop,
+    /* This is used when everything which needs to be printed has
+       already been printed.  But we still want to print the frame.  */
+    print_it_done
+  };
+
 struct bpstats
   {
     /* Linked list because there can be two breakpoints at the same
@@ -452,10 +488,9 @@ struct bpstats
     /* Nonzero if this breakpoint tells us to stop.  */
     char stop;
 
-    /* Function called by bpstat_print to print stuff associated with
-       this element of the bpstat chain.  Returns 0 or 1 just like
-       bpstat_print, or -1 if it can't deal with it.  */
-    int (*print_it) PARAMS ((bpstat bs));
+    /* Tell bpstat_print and print_bp_stop_message how to print stuff
+       associated with this element of the bpstat chain.  */
+    enum bp_print_how print_it;
   };
 
 enum inf_context
@@ -516,6 +551,12 @@ extern void breakpoint_clear_ignore_counts PARAMS ((void));
 
 extern void break_command PARAMS ((char *, int));
 
+extern void hbreak_command_wrapper PARAMS ((char *, int));
+extern void thbreak_command_wrapper PARAMS ((char *, int));
+extern void rbreak_command_wrapper PARAMS ((char *, int));
+extern void watch_command_wrapper PARAMS ((char *, int));
+extern void awatch_command_wrapper PARAMS ((char *, int));
+extern void rwatch_command_wrapper PARAMS ((char *, int));
 extern void tbreak_command PARAMS ((char *, int));
 
 extern int insert_breakpoints PARAMS ((void));
@@ -593,6 +634,10 @@ enable_watchpoints_after_interactive_call_stop PARAMS ((void));
 
 extern void clear_breakpoint_hit_counts PARAMS ((void));
 
+extern int get_number PARAMS ((char **));
+
+extern int get_number_or_range PARAMS ((char **));
+
 /* The following are for displays, which aren't really breakpoints, but
    here is as good a place as any for them.  */
 
@@ -612,8 +657,12 @@ extern void make_breakpoint_permanent PARAMS ((struct breakpoint *));
 
 extern struct breakpoint *create_solib_event_breakpoint PARAMS ((CORE_ADDR));
 
+extern struct breakpoint *create_thread_event_breakpoint PARAMS ((CORE_ADDR));
+
 extern void remove_solib_event_breakpoints PARAMS ((void));
 
+extern void remove_thread_event_breakpoints PARAMS ((void));
+
 extern void disable_breakpoints_in_shlibs PARAMS ((int silent));
 
 extern void re_enable_breakpoints_in_shlibs PARAMS ((void));
This page took 0.038726 seconds and 4 git commands to generate.