* config/i386/tm-i386.h (PARM_BOUNDARY, CALL_DUMMY,
[deliverable/binutils-gdb.git] / gdb / breakpoint.h
index c25ab41f8faac1bfb8d1a1ee82a8e390b0c8de02..7ab300ffb65efac794e9500c99558d38da537716 100644 (file)
@@ -1,5 +1,6 @@
 /* Data structures associated with breakpoints in GDB.
-   Copyright (C) 1992, 93, 94, 95, 96, 98, 1999 Free Software Foundation, Inc.
+   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,6 +27,8 @@
 
 #include "gdb-events.h"
 
+struct value;
+
 /* 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.  */
@@ -104,6 +107,14 @@ enum bptype
 
     bp_thread_event,
 
+    /* On the same principal, an overlay manager can arrange to call a
+       magic location in the inferior whenever there is an interesting
+       change in overlay status.  GDB can update its overlay tables
+       and fiddle with breakpoints in overlays when this breakpoint 
+       is hit.  */
+
+    bp_overlay_event, 
+
     /* These breakpoints are used to implement the "catch load" command
        on platforms whose dynamic linkers support such functionality.  */
     bp_catch_load,
@@ -132,21 +143,21 @@ enum bptype
 
 /* States of enablement of breakpoint. */
 
-enum enable
+enum enable_state
   {
-    disabled,          /* The eventpoint is inactive, and cannot trigger. */
-    enabled,           /* The eventpoint is active, and can trigger. */
-    shlib_disabled,    /* The eventpoint's address is in an unloaded solib.
+    bp_disabled,       /* The eventpoint is inactive, and cannot trigger. */
+    bp_enabled,                /* The eventpoint is active, and can trigger. */
+    bp_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 
+    bp_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
+    bp_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
@@ -158,10 +169,10 @@ enum enable
 
 enum bpdisp
   {
-    del,                       /* Delete it */
-    del_at_next_stop,          /* Delete at next stop, whether hit or not */
-    disable,                   /* Disable it */
-    donttouch                  /* Leave it alone */
+    disp_del,                  /* Delete it */
+    disp_del_at_next_stop,     /* Delete at next stop, whether hit or not */
+    disp_disable,              /* Disable it */
+    disp_donttouch             /* Leave it alone */
   };
 
 enum target_hw_bp_type
@@ -186,22 +197,23 @@ struct breakpoint
     /* Type of breakpoint. */
     enum bptype type;
     /* Zero means disabled; remember the info but don't break here.  */
-    enum enable enable;
+    enum enable_state enable_state;
     /* What to do with this breakpoint after we hit it. */
     enum bpdisp disposition;
     /* Number assigned to distinguish breakpoints.  */
     int number;
 
-    /* Address to break at, or NULL if not a breakpoint.  */
+    /* Address to break at.
+       Note that zero is a perfectly valid code address on some
+       platforms (for example, the mn10200 and mn10300 simulators).
+       NULL is not a special value for this field.  */
     CORE_ADDR address;
 
-    /* Line number of this address.  Only matters if address is
-       non-NULL.  */
+    /* Line number of this address.  */
 
     int line_number;
 
-    /* Source file name of this address.  Only matters if address is
-       non-NULL.  */
+    /* Source file name of this address.  */
 
     char *source_file;
 
@@ -216,11 +228,10 @@ struct breakpoint
        control of the target insert_breakpoint and remove_breakpoint routines.
        No other code should assume anything about the value(s) here.  */
     char shadow_contents[BREAKPOINT_MAX];
-    /* Nonzero if this breakpoint is now inserted.  Only matters if address
-       is non-NULL.  */
+    /* Nonzero if this breakpoint is now inserted.  */
     char inserted;
     /* Nonzero if this is not the first breakpoint in the list
-       for the given address.  Only matters if address is non-NULL.  */
+       for the given address.  */
     char duplicate;
     /* Chain of command lines to execute when this breakpoint is hit.  */
     struct command_line *commands;
@@ -230,8 +241,7 @@ struct breakpoint
     /* Conditional.  Break only if this expression's value is nonzero.  */
     struct expression *cond;
 
-    /* String we used to set the breakpoint (malloc'd).  Only matters if
-       address is non-NULL.  */
+    /* String we used to set the breakpoint (malloc'd).  */
     char *addr_string;
     /* Language we used to set the breakpoint.  */
     enum language language;
@@ -249,10 +259,10 @@ struct breakpoint
        valid anywhere (e.g. consists just of global symbols).  */
     struct block *exp_valid_block;
     /* Value of the watchpoint the last time we checked it.  */
-    value_ptr val;
+    struct value *val;
 
     /* Holds the value chain for a hardware watchpoint expression.  */
-    value_ptr val_chain;
+    struct value *val_chain;
 
     /* Holds the address of the related watchpoint_scope breakpoint
        when using watchpoints on local variables (might the concept
@@ -260,10 +270,10 @@ struct breakpoint
        it the watchpoint_scope breakpoint or something like that. FIXME).  */
     struct breakpoint *related_breakpoint;
 
-    /* Holds the frame address which identifies the frame this watchpoint
-       should be evaluated in, or NULL if the watchpoint should be evaluated
-       on the outermost frame.  */
-    CORE_ADDR watchpoint_frame;
+    /* Holds the frame address which identifies the frame this
+       watchpoint should be evaluated in, or `null' if the watchpoint
+       should be evaluated on the outermost frame.  */
+    struct frame_id watchpoint_frame;
 
     /* Thread number for thread-specific breakpoint, or -1 if don't care */
     int thread;
@@ -280,17 +290,17 @@ struct breakpoint
     char *dll_pathname;
 
     /* Filename of a dll whose state change (e.g., load or unload)
-       triggered this catchpoint.  This field is only vaid immediately
+       triggered this catchpoint.  This field is only valid immediately
        after this catchpoint has triggered.  */
     char *triggered_dll_pathname;
 
     /* Process id of a child process whose forking triggered this
-       catchpoint.  This field is only vaid immediately after this
+       catchpoint.  This field is only valid immediately after this
        catchpoint has triggered.  */
     int forked_inferior_pid;
 
     /* Filename of a program whose exec triggered this catchpoint.
-       This field is only vaid immediately after this catchpoint has
+       This field is only valid immediately after this catchpoint has
        triggered.  */
     char *exec_pathname;
 
@@ -479,7 +489,7 @@ struct bpstats
     /* Commands left to be done.  */
     struct command_line *commands;
     /* Old value associated with a watchpoint.  */
-    value_ptr old_val;
+    struct value *old_val;
 
     /* Nonzero if this breakpoint tells us to print the frame.  */
     char print;
@@ -520,7 +530,7 @@ extern int breakpoint_inserted_here_p (CORE_ADDR);
 
 extern int frame_in_dummy (struct frame_info *);
 
-extern int breakpoint_thread_match (CORE_ADDR, int);
+extern int breakpoint_thread_match (CORE_ADDR, ptid_t);
 
 extern void until_break_command (char *, int);
 
@@ -597,12 +607,13 @@ extern void update_breakpoints_after_exec (void);
    be detached and allowed to run free.
 
    It is an error to use this function on the process whose id is
-   inferior_pid.  */
+   inferior_ptid.  */
 extern int detach_breakpoints (int);
 
 extern void enable_longjmp_breakpoint (void);
-
 extern void disable_longjmp_breakpoint (void);
+extern void enable_overlay_breakpoints (void);
+extern void disable_overlay_breakpoints (void);
 
 extern void set_longjmp_resume_breakpoint (CORE_ADDR, struct frame_info *);
 /* These functions respectively disable or reenable all currently
@@ -620,7 +631,7 @@ extern void set_longjmp_resume_breakpoint (CORE_ADDR, struct frame_info *);
    cause the inferior to stop in places where this frame is visible,
    and that can cause execution control to become very confused.
 
-   Note that if a user sets breakpoints in an interactively call
+   Note that if a user sets breakpoints in an interactively called
    function, the call_disabled watchpoints will have been reenabled
    when the first such breakpoint is reached.  However, on targets
    that are unable to unwind through the call dummy frame, watches
This page took 0.033603 seconds and 4 git commands to generate.