These APIs take size parameters, which can be used to properly bounds-check the inputs and outputs for various registers. Additionally, all backends now throw UC_ERR_ARG if the input register numbers are invalid. Completes #1831.
29 lines
994 B
C
29 lines
994 B
C
/* Unicorn Emulator Engine */
|
|
/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2015 */
|
|
|
|
/*
|
|
Modified for Unicorn Engine by Eric Poole <eric.poole@aptiv.com>, 2022
|
|
Copyright 2022 Aptiv
|
|
*/
|
|
|
|
#ifndef UC_QEMU_TARGET_TRICORE_H
|
|
#define UC_QEMU_TARGET_TRICORE_H
|
|
|
|
// functions to read & write registers
|
|
int tricore_reg_read(struct uc_struct *uc, unsigned int *regs,
|
|
void *const *vals, size_t *sizes, int count);
|
|
int tricore_reg_write(struct uc_struct *uc, unsigned int *regs,
|
|
const void *const *vals, size_t *sizes, int count);
|
|
|
|
int tricore_context_reg_read(struct uc_context *uc, unsigned int *regs,
|
|
void *const *vals, size_t *sizes, int count);
|
|
int tricore_context_reg_write(struct uc_context *uc, unsigned int *regs,
|
|
const void *const *vals, size_t *sizes,
|
|
int count);
|
|
|
|
void tricore_reg_reset(struct uc_struct *uc);
|
|
|
|
void tricore_uc_init(struct uc_struct *uc);
|
|
|
|
#endif
|