summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/arm/v7/instruction.c2
-rw-r--r--plugins/dalvik/pseudo/fill.c2
-rw-r--r--plugins/dalvik/pseudo/switch.c7
-rw-r--r--plugins/dalvik/v35/instruction.c8
-rw-r--r--plugins/pychrysalide/arch/instruction.c4
5 files changed, 13 insertions, 10 deletions
diff --git a/plugins/arm/v7/instruction.c b/plugins/arm/v7/instruction.c
index 97adddd..1c94887 100644
--- a/plugins/arm/v7/instruction.c
+++ b/plugins/arm/v7/instruction.c
@@ -210,7 +210,7 @@ GArchInstruction *g_armv7_instruction_new(itid_t uid, ARMv7Syntax sid)
result = g_object_new(G_TYPE_ARMV7_INSTRUCTION, NULL);
- G_ARCH_INSTRUCTION(result)->uid = uid;
+ g_arch_instruction_set_unique_id(G_ARCH_INSTRUCTION(result), uid);
result->sid = sid;
diff --git a/plugins/dalvik/pseudo/fill.c b/plugins/dalvik/pseudo/fill.c
index 12382f7..cc8a412 100644
--- a/plugins/dalvik/pseudo/fill.c
+++ b/plugins/dalvik/pseudo/fill.c
@@ -183,7 +183,7 @@ GArchInstruction *g_dalvik_fill_instr_new(uint16_t ident, GDalvikContext *ctx, c
result = g_object_new(G_TYPE_DALVIK_FILL_INSTR, NULL);
- G_ARCH_INSTRUCTION(result)->uid = DPO_FILL_ARRAY_DATA;
+ g_arch_instruction_set_unique_id(G_ARCH_INSTRUCTION(result), DPO_FILL_ARRAY_DATA);
if (!g_binary_content_read_u16(content, pos, SRE_LITTLE, &result->item_width))
goto gdfin_bad;
diff --git a/plugins/dalvik/pseudo/switch.c b/plugins/dalvik/pseudo/switch.c
index ea3aa90..f09fe59 100644
--- a/plugins/dalvik/pseudo/switch.c
+++ b/plugins/dalvik/pseudo/switch.c
@@ -193,7 +193,7 @@ GArchInstruction *g_dalvik_switch_instr_new(uint16_t ident, GDalvikContext *ctx,
result = g_object_new(G_TYPE_DALVIK_SWITCH_INSTR, NULL);
- G_ARCH_INSTRUCTION(result)->uid = ident;
+ g_arch_instruction_set_unique_id(G_ARCH_INSTRUCTION(result), ident);
if (!g_binary_content_read_u16(content, pos, SRE_LITTLE, &result->switch_size))
goto gdsin_bad;
@@ -237,6 +237,7 @@ GArchInstruction *g_dalvik_switch_instr_new(uint16_t ident, GDalvikContext *ctx,
static bool g_dalvik_switch_decode_data(GDalvikSwitchInstr *instr, const GBinContent *content, const vmpa2t *pos)
{
vmpa2t iter; /* Position modifiable */
+ itid_t uid; /* Identifiant unique */
int32_t first_key; /* Première clef */
uint16_t i; /* Boucle de parcours */
@@ -245,7 +246,9 @@ static bool g_dalvik_switch_decode_data(GDalvikSwitchInstr *instr, const GBinCon
copy_vmpa(&iter, pos);
- if (G_ARCH_INSTRUCTION(instr)->uid == DPO_PACKED_SWITCH)
+ uid = g_arch_instruction_get_unique_id(G_ARCH_INSTRUCTION(instr));
+
+ if (uid == DPO_PACKED_SWITCH)
{
if (!g_binary_content_read_s32(content, &iter, SRE_LITTLE, &first_key))
goto gdsdd_bad;
diff --git a/plugins/dalvik/v35/instruction.c b/plugins/dalvik/v35/instruction.c
index 28cb0dd..773ec7a 100644
--- a/plugins/dalvik/v35/instruction.c
+++ b/plugins/dalvik/v35/instruction.c
@@ -185,7 +185,7 @@ GArchInstruction *g_dalvik35_instruction_new(itid_t uid)
result = g_object_new(G_TYPE_DALVIK35_INSTRUCTION, NULL);
- G_ARCH_INSTRUCTION(result)->uid = uid;
+ g_arch_instruction_set_unique_id(G_ARCH_INSTRUCTION(result), uid);
return G_ARCH_INSTRUCTION(result);
@@ -232,7 +232,7 @@ static const char *g_dalvik35_instruction_get_keyword(const GDalvik35Instruction
const char *result; /* Désignation à retourner */
itid_t uid; /* Accès simplifié */
- uid = G_ARCH_INSTRUCTION(instr)->uid;
+ uid = g_arch_instruction_get_unique_id(G_ARCH_INSTRUCTION(instr));
assert(uid < DOP35_COUNT);
@@ -272,7 +272,7 @@ static void g_dalvik35_instruction_call_hook(GDalvik35Instruction *instr, InstrP
base = G_ARCH_INSTRUCTION(instr);
- uid = base->uid;
+ uid = g_arch_instruction_get_unique_id(base);
assert(uid < DOP35_COUNT);
@@ -301,7 +301,7 @@ static const char *g_dalvik35_instruction_get_description(const GDalvik35Instruc
const char *result; /* Description à retourner */
itid_t uid; /* Accès simplifié */
- uid = G_ARCH_INSTRUCTION(instr)->uid;
+ uid = g_arch_instruction_get_unique_id(G_ARCH_INSTRUCTION(instr));
assert(uid < DOP35_COUNT);
diff --git a/plugins/pychrysalide/arch/instruction.c b/plugins/pychrysalide/arch/instruction.c
index 1be3edb..757949a 100644
--- a/plugins/pychrysalide/arch/instruction.c
+++ b/plugins/pychrysalide/arch/instruction.c
@@ -407,7 +407,7 @@ static int py_arch_instruction_init(PyObject *self, PyObject *args, PyObject *kw
instr->cached_keyword = strdup(keyword);
- G_ARCH_INSTRUCTION(instr)->uid = uid;
+ g_arch_instruction_set_unique_id(G_ARCH_INSTRUCTION(instr), uid);
return 0;
@@ -723,7 +723,7 @@ static PyObject *py_arch_instruction_get_destinations(PyObject *self, void *unus
* *
* Description : Fournit l'identifiant unique pour un ensemble d'instructions.*
* *
-* Retour : Identifiant unique par type d'instruction et architecture. *
+* Retour : Identifiant unique par type d'instruction. *
* *
* Remarques : - *
* *