aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-events.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-03-23 00:44:54 -0400
committerMike Frysinger <vapier@gentoo.org>2021-02-06 12:12:51 -0500
commit4c0d76b9c420bb29cb3365c5edc9c78c50d2b231 (patch)
tree1cbf362654cf185294337a5f27e6d3c94fdb9d65 /sim/common/sim-events.h
parentcd89c53f6d475cd05a1858b9195770e347fb2e9e (diff)
downloadbinutils-4c0d76b9c420bb29cb3365c5edc9c78c50d2b231.zip
binutils-4c0d76b9c420bb29cb3365c5edc9c78c50d2b231.tar.gz
binutils-4c0d76b9c420bb29cb3365c5edc9c78c50d2b231.tar.bz2
sim: watchpoints: use common sim_pc_get
Few arches implement STATE_WATCHPOINTS()->pc while all of them implement sim_pc_get. Lets switch the sim-watch core for monitoring pc events to the sim_pc_get API so this module works for all ports, and then we can delete this old back channel of snooping in the port's cpu state -- the code needs the pointer to the pc storage so that it can read out bytes and compare them to the watchrange. This also fixes the logic on multi-cpu sims by removing the limitation of only being able to watch CPU0's state.
Diffstat (limited to 'sim/common/sim-events.h')
-rw-r--r--sim/common/sim-events.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sim/common/sim-events.h b/sim/common/sim-events.h
index 823fd8c..7a5fc96 100644
--- a/sim/common/sim-events.h
+++ b/sim/common/sim-events.h
@@ -149,6 +149,17 @@ extern sim_event *sim_events_watch_clock
void *data);
+/* Schedule an event when a PC matches a range. */
+
+extern sim_event *sim_events_watch_pc
+(SIM_DESC sd,
+ int is_within,
+ unsigned64 lb,
+ unsigned64 ub,
+ sim_event_handler *handler,
+ void *data);
+
+
/* Schedule an event when the test (IS_WITHIN == (VAL >= LB && VAL <=
UB)) of the NR_BYTES value at HOST_ADDR with BYTE_ORDER endian is
true.