aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-watch.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-09-05 08:16:23 +0000
committerAndrew Cagney <cagney@redhat.com>1997-09-05 08:16:23 +0000
commit1bba340afe265eabb1552aae207a9ab29b3650db (patch)
tree9e53a51621d45c504112784ab4b72070ae97bf57 /sim/common/sim-watch.h
parent1b465b54e1135c13343b13daeb555ba87de6c700 (diff)
downloadgdb-1bba340afe265eabb1552aae207a9ab29b3650db.zip
gdb-1bba340afe265eabb1552aae207a9ab29b3650db.tar.gz
gdb-1bba340afe265eabb1552aae207a9ab29b3650db.tar.bz2
Redo watchpoint code so that it target can specify interrupt names.
Replace v850 interrupt code with this common watchpoint code. Other minor fixes to core.
Diffstat (limited to 'sim/common/sim-watch.h')
-rw-r--r--sim/common/sim-watch.h34
1 files changed, 21 insertions, 13 deletions
diff --git a/sim/common/sim-watch.h b/sim/common/sim-watch.h
index 9d4e842..c2e3142 100644
--- a/sim/common/sim-watch.h
+++ b/sim/common/sim-watch.h
@@ -23,25 +23,25 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define SIM_WATCH_H
typedef enum {
+ invalid_watchpoint = -1,
pc_watchpoint,
clock_watchpoint,
cycles_watchpoint,
nr_watchpoint_types,
} watchpoint_type;
-typedef enum {
- invalid_watchpoint_action,
- n_interrupt_watchpoint_action,
- interrupt_watchpoint_action,
- break_watchpoint_action,
-} watchpoint_action;
-
-typedef struct _sim_watch_point {
- watchpoint_action action;
+typedef struct _sim_watch_point sim_watch_point;
+struct _sim_watch_point {
+ int ident;
+ watchpoint_type type;
+ int interrupt_nr; /* == nr_interrupts -> breakpoint */
+ int is_periodic;
int is_within;
- long arg;
+ unsigned long arg0;
+ unsigned long arg1;
sim_event *event;
-} sim_watch_point;
+ sim_watch_point *next;
+};
typedef struct _sim_watchpoints {
@@ -55,10 +55,18 @@ typedef struct _sim_watchpoints {
/* Pointer to the handler for interrupt watchpoints */
/* FIXME: can this be done better? */
+ /* NOTE, interrupt is passed in as the target of the pointer! */
sim_event_handler *interrupt_handler;
- /* suported watchpoints */
- sim_watch_point points[nr_watchpoint_types];
+ /* Pointer to a null terminated list of interrupt names */
+ /* FIXME: can this be done better? Look at the PPC's interrupt
+ mechanism and table for a rough idea of where it will go next */
+ int nr_interrupts;
+ char **interrupt_names;
+
+ /* active watchpoints */
+ int last_point_nr;
+ sim_watch_point *points;
} sim_watchpoints;