summaryrefslogtreecommitdiff
path: root/src/format/format.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-07-29 21:41:52 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-07-29 21:41:52 (GMT)
commit8e1f2335773a9025cd46d45a33261725707af3ba (patch)
tree6001a1095985514bbde3c8ec49b4dd5d32182fc8 /src/format/format.c
parent8b35a66464636d0c46237af7490a6ca6866ecc4d (diff)
Updated all decompiled instructions using right pseudo registers.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@253 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/format.c')
-rw-r--r--src/format/format.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/format/format.c b/src/format/format.c
index 930d8db..4f6df03 100644
--- a/src/format/format.c
+++ b/src/format/format.c
@@ -272,6 +272,7 @@ GBinRoutine **g_binary_format_get_routines(const GBinFormat *format, size_t *cou
* *
* Paramètres : format = informations chargées à consulter. *
* routine = routine à traiter. *
+* ctx = contexte de soutien à associer à l'opération. *
* *
* Description : Procède à la décompilation basique d'une routine donnée. *
* *
@@ -281,12 +282,11 @@ GBinRoutine **g_binary_format_get_routines(const GBinFormat *format, size_t *cou
* *
******************************************************************************/
-GDecInstruction *g_binary_format_decompile_routine(const GBinFormat *format, GBinRoutine *routine)
+GDecInstruction *g_binary_format_decompile_routine(const GBinFormat *format, GBinRoutine *routine, GDecContext *ctx)
{
GDecInstruction *result; /* Instructions décompilées */
GArchInstruction *instr; /* Instructions natives */
vmpa_t max; /* Première adresse à écarter */
- GDecContext *ctx; /* Contexte de décompilation */
GArchInstruction *iter; /* Boucle de parcours */
GDecInstruction *first; /* Première décompilation */
GDecInstruction *dinstr; /* Nouvelle décompilation */
@@ -297,8 +297,8 @@ GDecInstruction *g_binary_format_decompile_routine(const GBinFormat *format, GBi
max = g_binary_routine_get_address(routine)
+ g_binary_routine_get_size(routine);
- ctx = g_dec_context_new();
g_object_set_data(G_OBJECT(ctx), "format", format);
+ g_object_set_data(G_OBJECT(ctx), "routine", routine);
g_dec_context_set_max_address(ctx, max);
for (iter = instr;