diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/analysis/decomp/decompiler.c | 6 | ||||
-rw-r--r-- | src/analysis/decomp/il.c | 4 | ||||
-rw-r--r-- | src/analysis/routine.h | 21 |
3 files changed, 6 insertions, 25 deletions
diff --git a/src/analysis/decomp/decompiler.c b/src/analysis/decomp/decompiler.c index 432e924..03d2b70 100644 --- a/src/analysis/decomp/decompiler.c +++ b/src/analysis/decomp/decompiler.c @@ -169,8 +169,8 @@ static void prepare_all_routines_for_decomp(const GLoadedBinary *binary, const c /* instrs = g_binary_routine_get_instructions(routines[i]); - max = g_binary_routine_get_address(routines[i]) - + g_binary_routine_get_size(routines[i]); + max = g_XXX_binary_routine_get_address(routines[i]) + + g_XXX_binary_routine_get_size(routines[i]); */ //printf("\n##### DECOMPILE '%s' #####\n", g_binary_routine_to_string(routines[i])); @@ -179,7 +179,7 @@ static void prepare_all_routines_for_decomp(const GLoadedBinary *binary, const c /* dinstrs = build_decompiled_block(instrs, - g_binary_routine_get_address(routines[i]), + g_XXX_binary_routine_get_address(routines[i]), max, VMPA_MAX, context); */ diff --git a/src/analysis/decomp/il.c b/src/analysis/decomp/il.c index c125412..5827c4b 100644 --- a/src/analysis/decomp/il.c +++ b/src/analysis/decomp/il.c @@ -485,13 +485,15 @@ GDecInstruction *decompiled_routine_instructions(GBinRoutine *routine, GExeForma GDecInstruction *result; /* Instructions à retourner */ GDecContext *context; /* Contexte pour la décompil. */ GInstrBlock *blocks; /* Blocs basiques de routine */ + const mrange_t *range; /* Emplacement du symbole */ context = g_arch_processor_get_decomp_context(proc); g_dec_context_set_info(context, routine, format); blocks = g_binary_routine_get_basic_blocks(routine); - setup_awaited_regs_allocation(blocks, g_binary_routine_get_address(routine)); + range = g_binary_symbol_get_range(G_BIN_SYMBOL(routine)); + setup_awaited_regs_allocation(blocks, get_mrange_addr(range)->physical); result = decompiled_basic_block(blocks, context); diff --git a/src/analysis/routine.h b/src/analysis/routine.h index 7a836cf..e364c93 100644 --- a/src/analysis/routine.h +++ b/src/analysis/routine.h @@ -82,27 +82,6 @@ GBinRoutine *g_binary_routine_new(void); /* Crée une représentation de routine construisant une instance. */ GBinRoutine *g_binary_routine_new_constructor(GDataType *); -/* Définit la couverture physique / en mémoire d'une routine. */ -void g_binary_routine_set_range(GBinRoutine *, const mrange_t *); - -/* Fournit la couverture physique / en mémoire d'une routine. */ -const mrange_t *g_binary_routine_get_range(const GBinRoutine *); - - - -/* Fournit la position physique / en mémoire d'une routine. */ -//const vmpa2t *g_binary_routine_get_address(const GBinRoutine *); -#define g_binary_routine_get_address(r) 0 - -/* Définit la taille du code d'une routine. */ -void g_binary_routine_set_size(GBinRoutine *, off_t); - -/* Fournit la taille du code associé à une routine. */ -//off_t g_binary_routine_get_size(const GBinRoutine *); -#define g_binary_routine_get_size(r) 0 - - - /* Définit le type d'une routine. */ void g_binary_routine_set_type(GBinRoutine *, RoutineType); |