diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2014-07-31 05:53:06 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2014-07-31 05:53:06 (GMT) |
commit | a5d8e3fc30cda2e13d30f099e93ab1b182fdc0bd (patch) | |
tree | cf183906b2301cd3c726af820292fd0f2458bfa1 /src/arch/artificial.c | |
parent | dc436357ff29158dddd836d368d152d42d5b086b (diff) |
Improved the way code is decoded by avoiding to propagate the base address everywhere.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@385 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/artificial.c')
-rw-r--r-- | src/arch/artificial.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arch/artificial.c b/src/arch/artificial.c index 2a78255..6fbd6d9 100644 --- a/src/arch/artificial.c +++ b/src/arch/artificial.c @@ -124,7 +124,7 @@ static void g_db_instruction_init(GDbInstruction *instr) * * * Paramètres : data = flux de données à analyser. * * pos = position courante dans ce flux. [OUT] * -* len = taille totale des données à analyser. * +* end = limite des données à analyser. * * addr = adresse, virtuelle ou physique, de l'instruction. * * proc = architecture ciblée par le désassemblage. * * * @@ -136,7 +136,7 @@ static void g_db_instruction_init(GDbInstruction *instr) * * ******************************************************************************/ -GArchInstruction *g_db_instruction_new_from_data(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GArchProcessor *proc) +GArchInstruction *g_db_instruction_new_from_data(const bin_t *data, off_t *pos, off_t end, vmpa_t addr, const GArchProcessor *proc) { GArchInstruction *result; /* Instruction à retourner */ GArchOperand *operand; /* Octet non décodé à afficher */ @@ -144,7 +144,7 @@ GArchInstruction *g_db_instruction_new_from_data(const bin_t *data, off_t *pos, result = g_object_new(G_TYPE_DB_INSTRUCTION, NULL); operand = g_imm_operand_new_from_data(g_arch_processor_get_instruction_size(proc), - data, pos, len, + data, pos, end, g_arch_processor_get_endianness(proc)); if (operand == NULL) goto gdinfd_error; |