summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/dalvik/context.h')
-rw-r--r--src/arch/dalvik/context.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/arch/dalvik/context.h b/src/arch/dalvik/context.h
new file mode 100644
index 0000000..459cc22
--- /dev/null
+++ b/src/arch/dalvik/context.h
@@ -0,0 +1,73 @@
+
+/* OpenIDA - Outil d'analyse de fichiers binaires
+ * context.h - prototypes pour le contexte lié à l'exécution d'un processeur
+ *
+ * Copyright (C) 2011 Cyrille Bagard
+ *
+ * This file is part of OpenIDA.
+ *
+ * OpenIDA is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * OpenIDA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _ARCH_DALVIK_CONTEXT_H
+#define _ARCH_DALVIK_CONTEXT_H
+
+
+#include <glib-object.h>
+#include <stdbool.h>
+
+
+#include "../archbase.h"
+
+
+
+/* ------------------------ MANIPULATION GLOBALE DU CONTEXTE ------------------------ */
+
+
+#define G_TYPE_DALVIK_CONTEXT g_dalvik_context_get_type()
+#define G_DALVIK_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_dalvik_context_get_type(), GDalvikContext))
+#define G_IS_DALVIK_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_dalvik_context_get_type()))
+#define G_DALVIK_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_DALVIK_CONTEXT, GGDalvikContextClass))
+#define G_IS_DALVIK_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_DALVIK_CONTEXT))
+#define G_DALVIK_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_DALVIK_CONTEXT, GGDalvikContextClass))
+
+
+/* Définition d'un contexte pour processeur Dalkvik (instance) */
+typedef struct _GDalvikContext GDalvikContext;
+
+/* Définition d'un contexte pour processeur Dalkvik (classe) */
+typedef struct _GDalvikContextClass GDalvikContextClass;
+
+
+/* Indique le type définit par la GLib pour le contexte de processeur Dalkvik. */
+GType g_dalvik_context_get_type(void);
+
+/* Crée un contexte pour l'exécution du processeur Dalvik. */
+GDalvikContext *g_dalvik_context_new(void);
+
+
+
+/* ------------------------- MEMORISATION DES SAUTS DE CODE ------------------------- */
+
+
+/* Mémorise une nouvelle zone de code comme étant des données. */
+void g_dalvik_context_skip_new_area(GDalvikContext *, vmpa_t, vmpa_t);
+
+/* Indique si l'adresse est considérée comme zone de données. */
+bool g_dalvik_context_have_to_skip(GDalvikContext *, vmpa_t);
+
+
+
+#endif /* _ARCH_DALVIK_CONTEXT_H */