summaryrefslogtreecommitdiff
path: root/src/analysis/line-int.h
blob: 38efedaeabb6ff6ca4e5b576e73ce7902d16efcd (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

/* OpenIDA - Outil d'analyse de fichiers binaires
 * line-int.h - prototypes pour l'interface des représentations des lignes de rendu
 *
 * Copyright (C) 2008 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 _ANALYSIS_LINE_INT_H
#define _ANALYSIS_LINE_INT_H


#include "line.h"


#include "exporter-int.h"
#include "../common/dllist.h"



/* Ligne de représentation générique (instance) */
struct _GRenderingLine
{
    GContentExporter parent;                /* A laisser en premier        */

    DL_LIST_ITEM(link);                     /* Maillon de liste chaînée    */

    vmpa_t offset;                          /* Position en mémoire/physique*/
    off_t length;                           /* Nombre d'adresses associées */

    char *comment;                          /* Texte à afficher            */

    RenderingLineType type;                 /* Type de représentation      */
    RenderingLineFlag flags;                /* Extension d'informations    */

    GRenderingLine **from;                  /* Origines des références     */
    size_t from_count;                      /* Nombre de ces origines      */
    GRenderingLine **to;                    /* Eventuelles lignes visées   */
    InstructionLinkType *links_type;        /* Type des liens de dest.     */
    size_t to_count;                        /* Nombre de ces destinations  */

};


#define lines_list_last(head) dl_list_last(head, GRenderingLine, link)
#define lines_list_next_iter(iter, head) dl_list_next_iter(iter, head, GRenderingLine, link)
#define lines_list_prev_iter(iter, head) dl_list_prev_iter(iter, head, GRenderingLine, link)
#define lines_list_add_before(new, head, pos) dl_list_add_before(new, head, pos, link)
#define lines_list_add_tail(new, head) dl_list_add_tail(new, head, GRenderingLine, link)
#define lines_list_del(item, head) dl_list_del(item, head, GRenderingLine, link)
#define lines_list_for_each(pos, head) dl_list_for_each(pos, head, GRenderingLine, link)
#define lines_list_for_each_safe(pos, head, next) dl_list_for_each_safe(pos, head, next, GRenderingLine, link)


/* Ligne de représentation générique (classe) */
struct _GRenderingLineClass
{
    GContentExporterClass parent;           /* A laisser en premier        */

    GtkStyle *style;                        /* Style GTK commun aux lignes */

    /* Signaux */

    void (* rendering_line_flags_changed) (GRenderingLine *);

};



#endif  /* _ANALYSIS_LINE_INT_H */