summaryrefslogtreecommitdiff
path: root/src/arch/arm/context-int.h
blob: a232908e400ac25d0657abbf9756532d1e99709f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

/* Chrysalide - Outil d'analyse de fichiers binaires
 * context-int.h - prototypes internes pour le contexte lié à l'exécution d'un processeur
 *
 * Copyright (C) 2011-2014 Cyrille Bagard
 *
 *  This file is part of Chrysalide.
 *
 *  Chrysalide 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.
 *
 *  Chrysalide 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_ARM_CONTEXT_INT_H
#define _ARCH_ARM_CONTEXT_INT_H


#include "context.h"


#include "../context-int.h"



/* Découpage de la zone de désassemblage */
typedef struct _disass_arm_area
{
    virt_t start;                           /* Début de la zone            */
    virt_t end;                             /* Fin de la zone              */

    unsigned int marker;                    /* Type de décodage associé    */

} disass_arm_area;


/* Définition d'un contexte pour processeur ARM (instance) */
struct _GArmContext
{
    GProcContext parent;                    /* A laisser en premier        */

    disass_arm_area *areas;                 /* Désassemblage découpé       */
    size_t acount;                          /* Nombre de zones définies    */
    GMutex areas_access;                    /* Accès aux découpes de zones */

};


/* Définition d'un contexte pour processeur ARM (classe) */
struct _GArmContextClass
{
    GProcContextClass parent;               /* A laisser en premier        */

};



/* Enregistre l'encodage (générique) utilisé à une adresse. */
void _g_arm_context_define_encoding(GArmContext *, virt_t, unsigned int);

/* Indique l'encodage (générique) utilisé à une adresse donnée. */
unsigned int _g_arm_context_find_encoding(GArmContext *, virt_t);



#endif  /* _ARCH_ARM_CONTEXT_INT_H */