diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-03-06 18:48:16 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-03-06 18:48:16 (GMT) |
commit | 12b8a066d1d8dd8cbef587dc6fafed870604f49f (patch) | |
tree | 3eb6cfbab886b430a8479fda9a721f75ae806a4d /src/arch/raw.c | |
parent | 0320d85e480882c58f254640a54c6c6e190dbf47 (diff) |
Locked access to instruction operands when needed.
Diffstat (limited to 'src/arch/raw.c')
-rw-r--r-- | src/arch/raw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/arch/raw.c b/src/arch/raw.c index 63dadab..f22645f 100644 --- a/src/arch/raw.c +++ b/src/arch/raw.c @@ -512,6 +512,8 @@ static void g_raw_instruction_print(GRawInstruction *instr, GBufferLine *line, s first = true; + g_arch_instruction_lock_operands(base); + for (i = 0; i < base->operands_count; i++) { status = g_imm_operand_get_value(G_IMM_OPERAND(base->operands[i]), MDS_8_BITS, &byte); @@ -558,6 +560,8 @@ static void g_raw_instruction_print(GRawInstruction *instr, GBufferLine *line, s } + g_arch_instruction_unlock_operands(base); + /* Si une chaƮne reste encore */ if (iter > 1) { @@ -581,6 +585,8 @@ static void g_raw_instruction_print(GRawInstruction *instr, GBufferLine *line, s else { + g_arch_instruction_lock_operands(base); + if (base->operands_count > 0) { g_arch_operand_print(base->operands[0], line, 0/*syntax*/); @@ -596,6 +602,8 @@ static void g_raw_instruction_print(GRawInstruction *instr, GBufferLine *line, s } + g_arch_instruction_unlock_operands(base); + } } |