diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-04-19 18:36:28 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-04-19 18:36:28 (GMT) |
commit | 3dada5fbc27777217625603905727364a0cc996d (patch) | |
tree | 0ff4b94aca92e64a9e01594b4421f86465560395 /plugins/arm | |
parent | fad679ef8cd654646c9234ff8fd39507adad9b8e (diff) |
Changed the way the key for an architecture is provided.
Diffstat (limited to 'plugins/arm')
-rw-r--r-- | plugins/arm/v7/processor.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/plugins/arm/v7/processor.c b/plugins/arm/v7/processor.c index 61de7b5..078cc2d 100644 --- a/plugins/arm/v7/processor.c +++ b/plugins/arm/v7/processor.c @@ -63,6 +63,9 @@ static void g_armv7_processor_dispose(GArmV7Processor *); /* Procède à la libération totale de la mémoire. */ static void g_armv7_processor_finalize(GArmV7Processor *); +/* Fournit la désignation interne du processeur d'architecture. */ +static char *g_armv7_processor_get_key(const GArmV7Processor *); + /* Fournit un contexte pour l'exécution du processeur ARM. */ static GArmV7Context *g_armv7_processor_get_context(const GArmV7Processor *); @@ -99,7 +102,6 @@ static void g_armv7_processor_class_init(GArmV7ProcessorClass *klass) proc = G_ARCH_PROCESSOR_CLASS(klass); - proc->key = "armv7"; proc->desc = "ARM v7"; proc->endianness = SRE_LITTLE; @@ -107,6 +109,7 @@ static void g_armv7_processor_class_init(GArmV7ProcessorClass *klass) proc->inssize = MDS_32_BITS; proc->virt_space = true; + proc->get_key = (get_processor_key_fc)g_armv7_processor_get_key; proc->get_ctx = (get_processor_context_fc)g_armv7_processor_get_context; proc->disassemble = (disass_instr_fc)g_armv7_processor_disassemble; @@ -195,6 +198,29 @@ GArmV7Processor *g_armv7_processor_new(void) /****************************************************************************** * * +* Paramètres : proc = processeur d'architecture à consulter. * +* * +* Description : Fournit la désignation interne du processeur d'architecture. * +* * +* Retour : Simple chaîne de caractères. * +* * +* Remarques : - * +* * +******************************************************************************/ + +static char *g_armv7_processor_get_key(const GArmV7Processor *proc) +{ + char *result; /* Désignation à renvoyer */ + + result = strdup("armv7"); + + return result; + +} + + +/****************************************************************************** +* * * Paramètres : proc = architecture, spectatrice ici. * * * * Description : Fournit un contexte pour l'exécution du processeur Arm. * |