diff --git a/qemu/ioport.c b/qemu/ioport.c index f4e56510..338a296a 100644 --- a/qemu/ioport.c +++ b/qemu/ioport.c @@ -69,7 +69,7 @@ void cpu_outb(struct uc_struct *uc, pio_addr_t addr, uint8_t val) // Unicorn: call interrupt callback if registered if (uc->hook_out_idx) ((uc_cb_insn_out_t)uc->hook_callbacks[uc->hook_out_idx].callback)( - (uch)uc, addr, 1, val, + uc, addr, 1, val, uc->hook_callbacks[uc->hook_out_idx].user_data); } @@ -79,7 +79,7 @@ void cpu_outw(struct uc_struct *uc, pio_addr_t addr, uint16_t val) // Unicorn: call interrupt callback if registered if (uc->hook_out_idx) ((uc_cb_insn_out_t)uc->hook_callbacks[uc->hook_out_idx].callback)( - (uch)uc, addr, 2, val, + uc, addr, 2, val, uc->hook_callbacks[uc->hook_out_idx].user_data); } @@ -88,7 +88,7 @@ void cpu_outl(struct uc_struct *uc, pio_addr_t addr, uint32_t val) //LOG_IOPORT("outl: %04"FMT_pioaddr" %08"PRIx32"\n", addr, val); if (uc->hook_out_idx) ((uc_cb_insn_out_t)uc->hook_callbacks[uc->hook_out_idx].callback)( - (uch)uc, addr, 4, val, + uc, addr, 4, val, uc->hook_callbacks[uc->hook_out_idx].user_data); } @@ -97,7 +97,7 @@ uint8_t cpu_inb(struct uc_struct *uc, pio_addr_t addr) //LOG_IOPORT("inb : %04"FMT_pioaddr" %02"PRIx8"\n", addr, val); if (uc->hook_in_idx) return ((uc_cb_insn_in_t)uc->hook_callbacks[uc->hook_in_idx].callback)( - (uch)uc, addr, 1, + uc, addr, 1, uc->hook_callbacks[uc->hook_in_idx].user_data); return 0; @@ -108,7 +108,7 @@ uint16_t cpu_inw(struct uc_struct *uc, pio_addr_t addr) //LOG_IOPORT("inw : %04"FMT_pioaddr" %04"PRIx16"\n", addr, val); if (uc->hook_in_idx) return ((uc_cb_insn_in_t)uc->hook_callbacks[uc->hook_in_idx].callback)( - (uch)uc, addr, 2, + uc, addr, 2, uc->hook_callbacks[uc->hook_in_idx].user_data); return 0; @@ -119,7 +119,7 @@ uint32_t cpu_inl(struct uc_struct *uc, pio_addr_t addr) //LOG_IOPORT("inl : %04"FMT_pioaddr" %08"PRIx32"\n", addr, val); if (uc->hook_in_idx) return ((uc_cb_insn_in_t)uc->hook_callbacks[uc->hook_in_idx].callback)( - (uch)uc, addr, 4, + uc, addr, 4, uc->hook_callbacks[uc->hook_in_idx].user_data); return 0;