diff options
| author | Cyrille Bagard <nocbos@gmail.com> | 2016-02-02 23:53:08 (GMT) | 
|---|---|---|
| committer | Cyrille Bagard <nocbos@gmail.com> | 2016-02-02 23:53:08 (GMT) | 
| commit | 5fb8fb821698f43e9e2306841ff1f5a77876aed8 (patch) | |
| tree | 16d01bc241c68d3f5380292d8b77b13070f51752 | |
| parent | 1a5aafe8e1c64289e438a277ac05d9e9a0f1bd49 (diff) | |
Removed the definition of a useless deprecated function.
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | src/arch/immediate.c | 119 | ||||
| -rw-r--r-- | src/arch/immediate.h | 6 | 
3 files changed, 6 insertions, 125 deletions
| @@ -1,5 +1,11 @@  16-02-03  Cyrille Bagard <nocbos@gmail.com> +	* src/arch/immediate.c: +	* src/arch/immediate.h: +	Remove the definition of a useless deprecated function. + +16-02-03  Cyrille Bagard <nocbos@gmail.com> +  	* src/analysis/disass/area.c:  	* src/glibext/gbinportion.c:  	Prevent access to uninitialised memory. diff --git a/src/arch/immediate.c b/src/arch/immediate.c index 85d98a0..cd36de2 100644 --- a/src/arch/immediate.c +++ b/src/arch/immediate.c @@ -217,125 +217,6 @@ static void g_imm_operand_finalize(GImmOperand *operand)  /******************************************************************************  *                                                                             * -*  Paramètres  : size   = taille de l'opérande souhaitée.                     * -*                data   = flux de données à analyser.                         * -*                addr   = position courante dans ce flux. [OUT]               * -*                end    = limite des données à analyser.                      * -*                low    = position éventuelle des 4 bits visés. [OUT]         * -*                endian = ordre des bits dans la source.                      * -*                                                                             * -*  Description : Crée un opérande réprésentant une valeur numérique.          * -*                                                                             * -*  Retour      : Instruction mise en place.                                   * -*                                                                             * -*  Remarques   : -                                                            * -*                                                                             * -******************************************************************************/ - -GArchOperand *_g_imm_operand_new_from_data_old(MemoryDataSize size, const bin_t *data, vmpa2t *addr, off_t end, bool *low, SourceEndian endian) -{ -    GImmOperand *result;                    /* Opérande à retourner        */ -    off_t old;                              /* Ancienne tête de lecture    */ -    off_t pos;                              /* Position physique           */ -    uint8_t uval8;                          /* Valeur sur 8 bits           */ -    uint16_t uval16;                        /* Valeur sur 16 bits          */ -    uint32_t uval32;                        /* Valeur sur 32 bits          */ -    uint64_t uval64;                        /* Valeur sur 64 bits          */ -    int8_t sval8;                           /* Valeur sur 8 bits           */ -    int16_t sval16;                         /* Valeur sur 16 bits          */ -    int32_t sval32;                         /* Valeur sur 32 bits          */ -    int64_t sval64;                         /* Valeur sur 64 bits          */ - -    result = g_object_new(G_TYPE_IMM_OPERAND, NULL); - -    result->size = size; - -    pos = get_phy_addr(addr); -    old = pos; - -    switch (size) -    { -        case MDS_4_BITS_UNSIGNED: -            if (!read_u4(&uval8, data, &pos, end, low)) -                goto gionfd_error; -            result->raw = uval8; -            break; - -        case MDS_8_BITS_UNSIGNED: -            if (!read_u8(&uval8, data, &pos, end)) -                goto gionfd_error; -            result->raw = uval8; -            break; - -        case MDS_16_BITS_UNSIGNED: -            if (!read_u16(&uval16, data, &pos, end, endian)) -                goto gionfd_error; -            result->raw = uval16; -            break; - -        case MDS_32_BITS_UNSIGNED: -            if (!read_u32(&uval32, data, &pos, end, endian)) -                goto gionfd_error; -            result->raw = uval32; -            break; - -        case MDS_64_BITS_UNSIGNED: -            if (!read_u64(&uval64, data, &pos, end, endian)) -                goto gionfd_error; -            result->raw = uval64; -            break; - -        case MDS_4_BITS_SIGNED: -            if (!read_s4(&sval8, data, &pos, end, low)) -                goto gionfd_error; -            result->raw = sval8; -            break; - -        case MDS_8_BITS_SIGNED: -            if (!read_s8(&sval8, data, &pos, end)) -                goto gionfd_error; -            result->raw = sval8; -            break; - -        case MDS_16_BITS_SIGNED: -            if (!read_s16(&sval16, data, &pos, end, endian)) -                goto gionfd_error; -            result->raw = sval16; -            break; - -        case MDS_32_BITS_SIGNED: -            if (!read_s32(&sval32, data, &pos, end, endian)) -                goto gionfd_error; -            result->raw = sval32; -            break; - -        case MDS_64_BITS_SIGNED: -            if (!read_s64(&sval64, data, &pos, end, endian)) -                goto gionfd_error; -            result->raw = sval64; -            break; - -        case MDS_UNDEFINED: -            goto gionfd_error; -            break; - -    } - -    advance_vmpa(addr, pos - old); - -    return G_ARCH_OPERAND(result); - - gionfd_error: - -    g_object_unref(G_OBJECT(result)); - -    return NULL; - -} - - -/****************************************************************************** -*                                                                             *  *  Paramètres  : size    = taille de l'opérande souhaitée.                    *  *                content = flux de données à analyser.                        *  *                addr    = position courante dans ce flux. [OUT]              * diff --git a/src/arch/immediate.h b/src/arch/immediate.h index 32d2a07..640ac50 100644 --- a/src/arch/immediate.h +++ b/src/arch/immediate.h @@ -69,12 +69,6 @@ typedef struct _GImmOperandClass GImmOperandClass;  GType g_imm_operand_get_type(void);  /* Crée un opérande réprésentant une valeur numérique. */ -GArchOperand *_g_imm_operand_new_from_data_old(MemoryDataSize, const bin_t *, vmpa2t *, off_t, bool *, SourceEndian)  __attribute__ ((deprecated)); - -#define g_imm_operand_new_from_data_old(size, data, pos, len, endian) \ -    _g_imm_operand_new_from_data_old(size, data, pos, len, NULL, endian) - -/* Crée un opérande réprésentant une valeur numérique. */  GArchOperand *_g_imm_operand_new_from_data(MemoryDataSize, const GBinContent *, vmpa2t *, bool *, SourceEndian);  #define g_imm_operand_new_from_data(size, content, addr, endian) \ | 
