summaryrefslogtreecommitdiff
path: root/src/analysis/binary-int.h
blob: 60b966205f71e112afbae8a5a99ed76a0f2a806a (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

/* Chrysalide - Outil d'analyse de fichiers binaires
 * binary-int.h - prototypes pour la définition interne des binaires
 *
 * Copyright (C) 2012-2014 Cyrille Bagard
 *
 *  This file is part of Chrysalide.
 *
 *  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 _ANALYSIS_BINARY_INT_H
#define _ANALYSIS_BINARY_INT_H


#include "binary.h"


#include "db/client.h"
#include "../format/format.h"



/* Fournit le fichier correspondant à l'élément binaire. */
typedef const char * (* get_binary_name_fc) (const GLoadedBinary *, bool); //// REMME


/* Description de fichier binaire (instance) */
struct _GLoadedBinary
{
    GObject parent;                         /* A laisser en premier        */

    char *username;                         /* Identifiant de l'utilisateur*/
    bool username_changed;                  /* Mémorise les changements    */
    char *remote_host;                      /* Nom du serveur distant      */
    unsigned short remote_port;             /* Port du serveur distant     */
    bool use_remote_server;                 /* Indique une utilisation     */

    GDbClient *local;                       /* Enregistrements locaux      */
    GDbClient *remote;                      /* Enregistrements distants    */

    DBStorage storages[DBF_COUNT];          /* Lieux d'enregistrement      */
    GList *collections;                     /* Ensemble de modifications   */

    get_binary_name_fc get_name;            /* Obtention d'une description */ //// REMME

    GBinContent *content;                   /* Contenu binaire chargé      */ //// REMME

    GExeFormat *format;                     /* Format du binaire           */
    GDbgFormat *debug;                      /* Informations de débogage    */ //// REMME
    GArchProcessor *proc;                   /* Architecture du binaire     */

    GArchInstruction *instrs;               /* Instructions d'assemblage   */
    GCodeBuffer *disass_buffer;             /* Instructions lisibles       */
    GCodeBuffer **dec_buffers;              /* Sources sous forme de texte */
    size_t decbuf_count;                    /* Taille des tableaux         */
    size_t defsrc;                          /* Fichier source principal    */

    bool col_display[BVW_COUNT][BLC_DISPLAY];/* Position et code binaire   */
    bool lines_display;                     /* Affichage des lignes        */

};

/* Description de fichier binaire (classe) */
struct _GLoadedBinaryClass
{
    GObjectClass parent;                    /* A laisser en premier        */

    /* Signaux */

    void (* disassembly_done) (GLoadedBinary *);
    void (* display_changed) (GLoadedBinary *, BinaryView, BufferLineColumn);

};



#endif  /* _ANALYSIS_BINARY_INT_H */