I've committed the attached patch which makes cgen_bi_endian_cpu::trace_counter a virtual method in order to allow hooks in inherited classes. It also fixes an astonishing bug in that some of the GETMEM* and SETMEM* methods were reading/writing to insn memory. Dave