summaryrefslogtreecommitdiff
path: root/src/arch/arm/v7/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/v7/fetch.c')
-rw-r--r--src/arch/arm/v7/fetch.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/arch/arm/v7/fetch.c b/src/arch/arm/v7/fetch.c
index 246d136..73cec6d 100644
--- a/src/arch/arm/v7/fetch.c
+++ b/src/arch/arm/v7/fetch.c
@@ -373,9 +373,9 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
bool ret; /* Bilan d'une récupération */
off_t val_offset; /* Position de valeur à lire */
vmpa2t sym_addr; /* Adresse de nouveau symbole */
- off_t length; /* Taille des données à lire */
- const bin_t *data; /* Données binaires à lire */
+ GBinContent *content; /* Contenu binaire à relire */
uint32_t target; /* Adresse virtuelle visée */
+ vmpa2t pos; /* Tête de lecture de valeur */
mrange_t sym_range; /* Espace du nouveau symbole */
VMPA_BUFFER(loc); /* Adresse au format texte */
size_t name_len; /* Taille de nomination finale */
@@ -441,22 +441,15 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
/* Lecture de la valeur vers laquelle renvoyer */
- data = g_binary_format_get_content(format, &length);
+ content = g_binary_format_get_content(format);
+ copy_vmpa(&pos, &sym_addr);
- printf(">>>>>>> @reading @ 0x%08x (0x%x)\n", (unsigned int)val_offset, offset);
+ ret = g_binary_content_read_u32(content, &pos, SRE_LITTLE /* FIXME */, &target);
+ g_object_unref(G_OBJECT(content));
-
- ret = read_u32(&target, data, &val_offset, length, SRE_LITTLE /* FIXME */);
if (!ret) return;
-
- printf(">>>>>>> @got target :: 0x%08x\n", (unsigned int)target);
-
-
-
-
-
/* Réalise l'intégration du symbole associé */
sym_instr = g_raw_instruction_new_from_value(&sym_addr, MDS_32_BITS_UNSIGNED, target);
@@ -506,7 +499,7 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
//g_imm_operand_set_value(G_IMM_OPERAND(sub_op), MDS_32_BITS_UNSIGNED, target);
-
+ /// FIXME ?!
if (target < 0x8000) return;