diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-03-02 14:33:09 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-03-02 14:33:09 (GMT) |
commit | b3471e0c9ce6cc1becc9f56832fb4b93b337cb21 (patch) | |
tree | d32db80f05296ec918ad24d93634ea7d3832e49e /src/arch/instruction.c | |
parent | 027305c2447b05de2c576e3f5ee32ced400f439f (diff) |
Filled rendering lines with relative binary contents.
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r-- | src/arch/instruction.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c index f539ddb..be049e1 100644 --- a/src/arch/instruction.c +++ b/src/arch/instruction.c @@ -190,6 +190,9 @@ static void g_arch_instruction_interface_init(GLineGeneratorInterface *iface) static void g_arch_instruction_dispose(GArchInstruction *instr) { + if (instr->content != NULL) + g_object_unref(G_OBJECT(instr->content)); + G_OBJECT_CLASS(g_arch_instruction_parent_class)->dispose(G_OBJECT(instr)); } @@ -324,6 +327,27 @@ void g_arch_instruction_call_hook(GArchInstruction *instr, InstrProcessHook type /****************************************************************************** * * * Paramètres : instr = instruction quelconque à modifier. * +* content = contenu binaire global à référencer. * +* * +* Description : Note le contenu du sein duquel l'instruction est issue. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void g_arch_instruction_set_global_content(GArchInstruction *instr, const GBinContent *content) +{ + g_object_ref(G_OBJECT(content)); + instr->content = content; + +} + + +/****************************************************************************** +* * +* Paramètres : instr = instruction quelconque à modifier. * * address = adresse virtuelle et/ou position physique. * * length = taille de l'instruction. * * * @@ -1140,6 +1164,8 @@ static void _g_arch_instruction_print(GArchInstruction *instr, GBufferLine *line g_buffer_line_fill_vmpa(line, get_mrange_addr(&instr->range), MDS_32_BITS_UNSIGNED, MDS_32_BITS_UNSIGNED); + g_buffer_line_fill_content(line, instr->content, &instr->range, VMPA_NO_PHYSICAL); + /* Instruction proprement dite */ key = g_arch_instruction_get_keyword(instr, 0/*, syntax*/); |