Fix problems introduced with my last change.
[deliverable/binutils-gdb.git] / gdb / breakpoint.h
index 3f710aaf172667c1cf75ed0ee4a6dba363c0af23..12f110f895c1d652fbe8fc05ef2eaf83089d157c 100644 (file)
@@ -24,6 +24,8 @@
 #include "frame.h"
 #include "value.h"
 
+#include "gdb-events.h"
+
 /* This is the maximum number of bytes a breakpoint instruction can take.
    Feel free to increase it.  It's just used in a few places to size
    arrays that should be independent of the target architecture.  */
@@ -92,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,
@@ -127,13 +139,18 @@ enum enable
     shlib_disabled,    /* The eventpoint's address is in an unloaded solib.
                           The eventpoint will be automatically enabled 
                           and reset when that solib is loaded. */
-    call_disabled      /* The eventpoint has been disabled while a call 
+    call_disabled,     /* The eventpoint has been disabled while a call 
                           into the inferior is "in flight", because some 
                           eventpoints interfere with the implementation of 
                           a call on some targets.  The eventpoint will be 
                           automatically enabled and reset when the call 
                           "lands" (either completes, or stops at another 
                           eventpoint). */
+    permanent          /* There is a breakpoint instruction hard-wired into
+                          the target's code.  Don't try to write another
+                          breakpoint instruction on top of it, or restore
+                          its value.  Step over it using the architecture's
+                          SKIP_INSN macro.  */
   };
 
 
@@ -368,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
@@ -403,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
@@ -427,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
@@ -445,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
@@ -457,15 +499,23 @@ enum inf_context
     inf_running,
     inf_exited
   };
+
+/* The possible return values for breakpoint_here_p.
+   We guarantee that zero always means "no breakpoint here".  */
+enum breakpoint_here
+  {
+    no_breakpoint_here = 0,
+    ordinary_breakpoint_here,
+    permanent_breakpoint_here
+  };
 \f
 
 /* Prototypes for breakpoint-related functions.  */
 
-#ifdef __STDC__                        /* Forward declarations for prototypes */
+/* Forward declarations for prototypes */
 struct frame_info;
-#endif
 
-extern int breakpoint_here_p PARAMS ((CORE_ADDR));
+extern enum breakpoint_here breakpoint_here_p PARAMS ((CORE_ADDR));
 
 extern int breakpoint_inserted_here_p PARAMS ((CORE_ADDR));
 
@@ -493,6 +543,10 @@ extern void mark_breakpoints_out PARAMS ((void));
 
 extern void breakpoint_init_inferior PARAMS ((enum inf_context));
 
+extern struct cleanup *make_cleanup_delete_breakpoint (struct breakpoint *);
+
+extern struct cleanup *make_exec_cleanup_delete_breakpoint (struct breakpoint *);
+
 extern void delete_breakpoint PARAMS ((struct breakpoint *));
 
 extern void breakpoint_auto_delete PARAMS ((bpstat));
@@ -501,6 +555,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));
@@ -578,6 +638,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.  */
 
@@ -593,10 +657,16 @@ extern void disable_breakpoint PARAMS ((struct breakpoint *));
 
 extern void enable_breakpoint PARAMS ((struct breakpoint *));
 
-extern void create_solib_event_breakpoint PARAMS ((CORE_ADDR));
+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));
@@ -623,4 +693,12 @@ extern int ep_is_shlib_catchpoint PARAMS ((struct breakpoint *));
 
 extern struct breakpoint *set_breakpoint_sal PARAMS ((struct symtab_and_line));
 
+/* Enable breakpoints and delete when hit.  Called with ARG == NULL
+   deletes all breakpoints. */
+extern void delete_command (char *arg, int from_tty);
+
+/* Pull all H/W watchpoints from the target. Return non-zero if the
+   remove fails. */
+extern int remove_hw_watchpoints (void);
+
 #endif /* !defined (BREAKPOINT_H) */
This page took 0.026263 seconds and 4 git commands to generate.