The problem we see here is that arm_disas_set_info is called after all of the instruction side-effects have taken place, so we disassemble using the mode of the subsequent instruction rather than the current state.
The only real workaround I can think of is eagerly expanding the disassembly and then storing that string in the trace buffer rather than storing the instruction opcode+size.
The problem we see here is that
arm_disas_set_info
is called after all of the instruction side-effects have taken place, so we disassemble using the mode of the subsequent instruction rather than the current state.The only real workaround I can think of is eagerly expanding the disassembly and then storing that string in the trace buffer rather than storing the instruction opcode+size.
@qwattash what do you think about this approach?