diff options
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r-- | src/arch/instruction.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c index ea713cd..402b0f5 100644 --- a/src/arch/instruction.c +++ b/src/arch/instruction.c @@ -159,15 +159,9 @@ static void g_arch_instruction_finalize(GArchInstruction *instr) * * ******************************************************************************/ -void g_arch_instruction_set_location(GArchInstruction *instr, const vmpa2t *address, off_t length) +void g_arch_instruction_set_range(GArchInstruction *instr, const mrange_t *range) { - copy_vmpa(&instr->address2, address); - - /* FIXME */ - instr->offset = get_phy_addr(address); - instr->address = get_virt_addr(address); - - instr->length = length; + copy_mrange(&instr->range, range); } @@ -175,23 +169,18 @@ void g_arch_instruction_set_location(GArchInstruction *instr, const vmpa2t *addr /****************************************************************************** * * * Paramètres : instr = instruction quelconque à consulter. * -* offset = position physique dans le code binaire/NULL. [OUT] * -* length = taille de l'instruction ou NULL. [OUT] * -* address = adresse virtuelle ou position physique/NULL. [OUT] * * * -* Description : Fournit la localisation d'une instruction. * +* Description : Fournit la place mémoire d'une instruction. * * * -* Retour : - * +* Retour : Zone mémoire couverte par l'instruction. * * * * Remarques : - * * * ******************************************************************************/ -const vmpa2t *g_arch_instruction_get_location2(const GArchInstruction *instr, off_t *length) +const mrange_t *g_arch_instruction_get_range(const GArchInstruction *instr) { - if (length != NULL) *length = instr->length; - - return &instr->address2; + return &instr->range; } @@ -699,7 +688,7 @@ static GBufferLine *_g_arch_instruction_print(const GArchInstruction *instr, GCo size_t klen; /* Taille de ce mot clef */ size_t i; /* Boucle de parcours */ - result = g_code_buffer_append_new_line(buffer, &instr->address2); + result = g_code_buffer_append_new_line(buffer, &instr->range); g_buffer_line_fill_for_instr(result, msize/* TODO ! */, msize, content, instr->length, true); |