summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/processor.c18
-rw-r--r--src/arch/processor.h12
2 files changed, 12 insertions, 18 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);
diff --git a/src/arch/processor.h b/src/arch/processor.h
index a856942..f7d474a 100644
--- a/src/arch/processor.h
+++ b/src/arch/processor.h
@@ -74,17 +74,7 @@ MemoryDataSize g_arch_processor_get_instruction_size(const GArchProcessor *);
GArchInstruction *g_arch_processor_decode_instruction(const GArchProcessor *, GProcContext *, const bin_t *, off_t *, off_t, vmpa_t, GBinFormat *) __attribute__ ((deprecated));
/* Désassemble une instruction dans un flux de données. */
-GArchInstruction *g_arch_processor_disassemble(const GArchProcessor *, GProcContext *, const bin_t *, vmpa2t *, phys_t) __attribute__ ((deprecated));
-
-
-
-#define g_arch_processor_disassemble_nextgen(_proc, _ctx, _cnt, _pos) \
- ({ \
- const bin_t *_bin_data; \
- off_t _bin_length; \
- _bin_data = g_binary_content_get(_cnt, &_bin_length); \
- g_arch_processor_disassemble(_proc, _ctx, _bin_data, _pos, _bin_length); \
- })
+GArchInstruction *g_arch_processor_disassemble(const GArchProcessor *, GProcContext *, const GBinContent *, vmpa2t *);