diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-07-16 00:17:48 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-07-16 00:17:48 (GMT) |
commit | a61f089babe336b012da31a494b0f7470b6e1a9a (patch) | |
tree | 0dccd2fe50375e84de49b1119a3feec68b6bd23d /src/arch/processor.c | |
parent | 46c8fd10ec5bff1ee1146a0b6a7aa7eb9f47a2da (diff) |
Used the binary contents a little bit more.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@551 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/processor.c')
-rw-r--r-- | src/arch/processor.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/arch/processor.c b/src/arch/processor.c index 2c86ffe..86e7845 100644 --- a/src/arch/processor.c +++ b/src/arch/processor.c @@ -269,11 +269,10 @@ GArchInstruction *g_arch_processor_decode_instruction(const GArchProcessor *proc /****************************************************************************** * * -* Paramètres : proc = architecture visée par la procédure. * -* ctx = contexte lié à l'exécution du processeur. * -* data = flux de données à analyser. * -* pos = position courante dans ce flux. [OUT] * -* end = limite des données à analyser. * +* Paramètres : proc = architecture visée par la procédure. * +* ctx = contexte lié à l'exécution du processeur. * +* content = flux de données à analyser. * +* pos = position courante dans ce flux. [OUT] * * * * Description : Désassemble une instruction dans un flux de données. * * * @@ -283,14 +282,19 @@ GArchInstruction *g_arch_processor_decode_instruction(const GArchProcessor *proc * * ******************************************************************************/ -GArchInstruction *g_arch_processor_disassemble(const GArchProcessor *proc, GProcContext *ctx, const bin_t *data, vmpa2t *pos, phys_t end) +GArchInstruction *g_arch_processor_disassemble(const GArchProcessor *proc, GProcContext *ctx, const GBinContent *content, vmpa2t *pos) { GArchInstruction *result; /* Instruction à renvoyer */ vmpa2t back; /* Position sauvegardée */ + /* FIXME */ + const bin_t *_bin_data; + off_t _bin_length; copy_vmpa(&back, pos); - result = G_ARCH_PROCESSOR_GET_CLASS(proc)->disassemble(proc, ctx, data, pos, end); + _bin_data = g_binary_content_get(content, &_bin_length); + + result = G_ARCH_PROCESSOR_GET_CLASS(proc)->disassemble(proc, ctx, _bin_data, pos, _bin_length); if (result == NULL) copy_vmpa(pos, &back); |