X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Farm_simulator.h;h=3aedaee2e8da205c5f7617282ffd1f4621a7b3d1;hb=a6c4eb03455f6e97fc25183aae249d6ccdcbfb0f;hp=7894873043a75184ddf407f84d2ff3f134c9c6a6;hpb=32c6d70f6acd41dd1af5ea73051dd6c8a46eac14;p=openocd.git diff --git a/src/target/arm_simulator.h b/src/target/arm_simulator.h index 7894873043..3aedaee2e8 100644 --- a/src/target/arm_simulator.h +++ b/src/target/arm_simulator.h @@ -15,17 +15,27 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * ***************************************************************************/ + #ifndef ARM_SIMULATOR_H #define ARM_SIMULATOR_H -#include "target.h" -#include "types.h" - -extern int arm_simulate_step(target_t *target, u32 *dry_run_pc); +struct target; +struct arm_sim_interface { + void *user_data; + uint32_t (*get_reg)(struct arm_sim_interface *sim, int reg); + void (*set_reg)(struct arm_sim_interface *sim, int reg, uint32_t value); + uint32_t (*get_reg_mode)(struct arm_sim_interface *sim, int reg); + void (*set_reg_mode)(struct arm_sim_interface *sim, int reg, uint32_t value); + uint32_t (*get_cpsr)(struct arm_sim_interface *sim, int pos, int bits); + enum arm_state (*get_state)(struct arm_sim_interface *sim); + void (*set_state)(struct arm_sim_interface *sim, enum arm_state mode); + enum arm_mode (*get_mode)(struct arm_sim_interface *sim); +}; -#define ERROR_ARM_SIMULATOR_NOT_IMPLEMENTED (-700) +/* armv4_5 version */ +int arm_simulate_step(struct target *target, uint32_t *dry_run_pc); #endif /* ARM_SIMULATOR_H */