mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
sclog: add missing instr_set_translation.
When we invent a movzx instruction as part of shift-count logging on x86, we apparently need to set its 'translation' field to point at a pre-existing instruction that it's logically related to. Later versions of DynamoRIO than I was running with will complain if this isn't done.
This commit is contained in:
parent
353db3132f
commit
04c50b6cfd
@ -452,8 +452,9 @@ static dr_emit_flags_t instrument_instr(
|
||||
st = drreg_reserve_register(drcontext, bb, instr, NULL, &r0);
|
||||
DR_ASSERT(st == DRREG_SUCCESS);
|
||||
opnd_t op_r0 = opnd_create_reg(r0);
|
||||
instrlist_preinsert(bb, instr, INSTR_CREATE_movzx(
|
||||
drcontext, op_r0, shiftcount));
|
||||
instr_t *movzx = INSTR_CREATE_movzx(drcontext, op_r0, shiftcount);
|
||||
instr_set_translation(movzx, instr_get_app_pc(instr));
|
||||
instrlist_preinsert(bb, instr, movzx);
|
||||
instr_format_location(instr, &loc);
|
||||
dr_insert_clean_call(
|
||||
drcontext, bb, instr, (void *)log_var_shift, false,
|
||||
|
Loading…
Reference in New Issue
Block a user