summaryrefslogtreecommitdiff
path: root/src/arch/arm/v7/fetch.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-12-12 18:05:45 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-12-12 18:05:45 (GMT)
commitdcc0438ff24efd5958b8d46940eb395ff2b7ed77 (patch)
treea977fdbd43abd34bbea73f1fd1aef89f364230f2 /src/arch/arm/v7/fetch.c
parentb3efd0bbc506e701ea9872f50b8b4db974f35954 (diff)
Applied some code refactoring to remove usages of GBinFormat in favor of GExeFormat.
Diffstat (limited to 'src/arch/arm/v7/fetch.c')
-rw-r--r--src/arch/arm/v7/fetch.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/arch/arm/v7/fetch.c b/src/arch/arm/v7/fetch.c
index 8c36f9b..7296717 100644
--- a/src/arch/arm/v7/fetch.c
+++ b/src/arch/arm/v7/fetch.c
@@ -34,6 +34,7 @@
#include "operands/offset.h"
#include "../register.h"
#include "../../raw.h"
+#include "../../../format/format.h"
@@ -53,7 +54,7 @@
* *
******************************************************************************/
-void help_fetching_with_instruction_b_with_orig(GArchInstruction *instr, GArchProcessor *proc, GArmV7Context *context, GBinFormat *format, ArmV7InstrSet iset)
+void help_fetching_with_instruction_b_with_orig(GArchInstruction *instr, GArchProcessor *proc, GArmV7Context *context, GExeFormat *format, ArmV7InstrSet iset)
{
const mrange_t *range; /* Emplacementt d'instruction */
virt_t pc; /* Position dans l'exécution */
@@ -120,7 +121,7 @@ void help_fetching_with_instruction_b_with_orig(GArchInstruction *instr, GArchPr
* *
******************************************************************************/
-void help_fetching_with_instruction_bl_with_orig(GArchInstruction *instr, GArchProcessor *proc, GArmV7Context *context, GBinFormat *format, ArmV7InstrSet iset)
+void help_fetching_with_instruction_bl_with_orig(GArchInstruction *instr, GArchProcessor *proc, GArmV7Context *context, GExeFormat *format, ArmV7InstrSet iset)
{
const mrange_t *range; /* Emplacementt d'instruction */
virt_t pc; /* Position dans l'exécution */
@@ -189,7 +190,7 @@ void help_fetching_with_instruction_bl_with_orig(GArchInstruction *instr, GArchP
* *
******************************************************************************/
-void help_fetching_with_instruction_blx_with_dest(GArchInstruction *instr, GArchProcessor *proc, GArmV7Context *context, GBinFormat *format, ArmV7InstrSet iset)
+void help_fetching_with_instruction_blx_with_dest(GArchInstruction *instr, GArchProcessor *proc, GArmV7Context *context, GExeFormat *format, ArmV7InstrSet iset)
{
const mrange_t *range; /* Emplacementt d'instruction */
virt_t pc; /* Position dans l'exécution */
@@ -248,7 +249,7 @@ void help_fetching_with_instruction_blx_with_dest(GArchInstruction *instr, GArch
* *
******************************************************************************/
-void help_fetching_with_instruction_bx_with_orig(GArchInstruction *instr, GArchProcessor *proc, GArmV7Context *context, GBinFormat *format, ArmV7InstrSet iset)
+void help_fetching_with_instruction_bx_with_orig(GArchInstruction *instr, GArchProcessor *proc, GArmV7Context *context, GExeFormat *format, ArmV7InstrSet iset)
{
GArchOperand *op; /* Opérande numérique en place */
GArmRegister *reg; /* Registre matériel manipulé */
@@ -310,7 +311,7 @@ void help_fetching_with_instruction_bx_with_orig(GArchInstruction *instr, GArchP
* *
******************************************************************************/
-void help_fetching_with_instruction_cb_n_z(GArchInstruction *instr, GArchProcessor *proc, GArmV7Context *context, GBinFormat *format)
+void help_fetching_with_instruction_cb_n_z(GArchInstruction *instr, GArchProcessor *proc, GArmV7Context *context, GExeFormat *format)
{
const mrange_t *range; /* Emplacementt d'instruction */
virt_t pc; /* Position dans l'exécution */
@@ -363,7 +364,7 @@ void help_fetching_with_instruction_cb_n_z(GArchInstruction *instr, GArchProcess
* *
******************************************************************************/
-void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *instr, GArchProcessor *proc, GArmV7Context *context, GBinFormat *format, ArmV7InstrSet iset)
+void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *instr, GArchProcessor *proc, GArmV7Context *context, GExeFormat *format, ArmV7InstrSet iset)
{
const mrange_t *range; /* Emplacementt d'instruction */
phys_t phys_pc; /* Position dans l'exécution */
@@ -423,7 +424,7 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
val_offset = phys_pc + offset;
- if (!g_exe_format_translate_offset_into_vmpa(G_EXE_FORMAT(format), val_offset, &sym_addr))
+ if (!g_exe_format_translate_offset_into_vmpa(format, val_offset, &sym_addr))
{
assert(0);
return;
@@ -441,7 +442,7 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
/* Lecture de la valeur vers laquelle renvoyer */
- content = g_binary_format_get_content(format);
+ content = g_binary_format_get_content(G_BIN_FORMAT(format));
copy_vmpa(&pos, &sym_addr);
@@ -461,7 +462,7 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
vmpa2_virt_to_string(get_mrange_addr(range), MDS_32_BITS, loc, NULL);
snprintf(name, name_len, _("Value used @ %s"), loc);
- ADD_RAW_AS_SYM(format, symbol, &sym_addr, sym_instr, comment, name);
+ ADD_RAW_AS_SYM(G_BIN_FORMAT(format), symbol, &sym_addr, sym_instr, comment, name);
free(name);