diff options
| author | Cyrille Bagard <nocbos@gmail.com> | 2015-07-24 18:43:55 (GMT) | 
|---|---|---|
| committer | Cyrille Bagard <nocbos@gmail.com> | 2015-07-24 18:43:55 (GMT) | 
| commit | 156d2e2f6beda2302552ac79678494d914fda05b (patch) | |
| tree | 021825960b7ac3315a336fc085a4f1d07c05df39 /src/arch/arm/v7 | |
| parent | 21537636cd8318cf5a720211619ad3c3023b52e9 (diff) | |
Replaced all remaining raw accesses to binary contents with the GBinContent wrapper in binary formats.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@555 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/arm/v7')
| -rw-r--r-- | src/arch/arm/v7/fetch.c | 21 | 
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;  | 
