forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -1690,12 +1690,6 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb,
|
||||
return 0;
|
||||
}
|
||||
|
||||
{
|
||||
/* XXX: Only first core gets profiled ? */
|
||||
SIM_CPU *cpu = STATE_CPU (sd, 0);
|
||||
STATE_WATCHPOINTS (sd)->pc = &cpu->pc;
|
||||
}
|
||||
|
||||
if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
|
||||
{
|
||||
free_state (sd);
|
||||
|
||||
Reference in New Issue
Block a user