summaryrefslogtreecommitdiff
path: root/plugins/dalvik
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-05-12 22:09:53 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-05-12 22:09:53 (GMT)
commit00e93226e72bdb18853580f553e32df111422936 (patch)
tree9c346903d4506cae2df19b9314cf307c783c0cb3 /plugins/dalvik
parente44ffc323c8a9d4b446baba6e0b131107312fa84 (diff)
Simplified the way processors are registered.
Diffstat (limited to 'plugins/dalvik')
-rw-r--r--plugins/dalvik/processor.c13
-rw-r--r--plugins/dalvik/v35/core.c2
-rw-r--r--plugins/dalvik/v35/processor.c3
3 files changed, 9 insertions, 9 deletions
diff --git a/plugins/dalvik/processor.c b/plugins/dalvik/processor.c
index 5c5ecb6..429c431 100644
--- a/plugins/dalvik/processor.c
+++ b/plugins/dalvik/processor.c
@@ -83,6 +83,11 @@ static void g_dalvik_processor_class_init(GDalvikProcessorClass *klass)
proc = G_ARCH_PROCESSOR_CLASS(klass);
+ proc->endianness = SRE_LITTLE;
+ proc->memsize = MDS_32_BITS;
+ proc->inssize = MDS_16_BITS;
+ proc->virt_space = false;
+
proc->get_ctx = (get_processor_context_fc)g_dalvik_processor_get_context;
}
@@ -102,14 +107,6 @@ static void g_dalvik_processor_class_init(GDalvikProcessorClass *klass)
static void g_dalvik_processor_init(GDalvikProcessor *proc)
{
- GArchProcessor *parent; /* Instance parente */
-
- parent = G_ARCH_PROCESSOR(proc);
-
- parent->endianness = SRE_LITTLE;
- parent->memsize = MDS_32_BITS;
- parent->inssize = MDS_16_BITS;
- parent->virt_space = false;
}
diff --git a/plugins/dalvik/v35/core.c b/plugins/dalvik/v35/core.c
index 7e36691..1ecaf82 100644
--- a/plugins/dalvik/v35/core.c
+++ b/plugins/dalvik/v35/core.c
@@ -74,7 +74,7 @@ bool init_dalvik35_core(void)
register_dalvik35_gtypes();
- result = register_processor_type("dalvik35", "Dalvik Virtual Machine v35", G_TYPE_DALVIK35_PROCESSOR);
+ result = register_processor_type(G_TYPE_DALVIK35_PROCESSOR);
return result;
diff --git a/plugins/dalvik/v35/processor.c b/plugins/dalvik/v35/processor.c
index b1c13d2..507373b 100644
--- a/plugins/dalvik/v35/processor.c
+++ b/plugins/dalvik/v35/processor.c
@@ -97,6 +97,9 @@ static void g_dalvik35_processor_class_init(GDalvik35ProcessorClass *klass)
proc = G_ARCH_PROCESSOR_CLASS(klass);
+ proc->key = "dalvik35";
+ proc->desc = "Dalvik Virtual Machine v35";
+
proc->disassemble = (disass_instr_fc)g_dalvik35_processor_disassemble;
}