/* OpenIDA - Outil d'analyse de fichiers binaires * line.h - prototypes pour la représentation 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 . */ #ifndef _ANALYSIS_LINE_H #define _ANALYSIS_LINE_H #include #include #include "../arch/processor.h" #include "../format/exe_format.h" /* Définitions des types de ligne */ typedef enum _RenderingLineType { RLT_PROLOGUE, /* Description de l'analyse */ RLT_PROTOTYPE, /* Prototype de fonction */ RLT_CODE /* Code en langage machine */ } RenderingLineType; /* Passage de paramètres compact */ typedef struct _disass_options { bool show_address; /* Affichage de l'adresse ? */ bool show_code; /* Affichage du code brut ? */ exe_format *format; /* Format du contenu bianire */ asm_processor *proc; /* Architecture utilisée */ } disass_options; /* Ligne de représentation générique */ typedef struct _rendering_line rendering_line; /* Ajoute une ligne à un ensemble existant. */ void add_line_to_rendering_lines(rendering_line **, rendering_line *); /* Insère une ligne dans un ensemble existant. */ void insert_line_into_rendering_lines(rendering_line **, rendering_line *, bool); /* Met à jour la nombre d'octets maximale par instruction. */ void get_rendering_line_binary_len(rendering_line *, off_t *); /* Prend en compte le nombre d'octets maximal par instruction. */ void set_rendering_line_max_binary_len(rendering_line *, off_t); /* Fournit les dimensions d'une ligne par rapport à d'autres. */ void get_rendering_line_size(rendering_line *, int *, int *); /* Procède à l'initialisation des bases d'une représentation. */ void draw_rendering_line(rendering_line *, GdkDrawable *, GdkGC *, gint, gint); /* ------------------------- LIGNE EN TETE DE DESASSEMBLAGE ------------------------- */ /* Crée une des lignes de description initiales. */ rendering_line *create_prologue_line(const char *); /* ----------------------- COMMENTAIRES SUR UNE LIGNE ENTIERE ----------------------- */ /* Crée une ligne de commentaires entière. */ rendering_line *create_comment_line(uint64_t, RenderingLineType, const char *, const disass_options *); /* ------------------------ LIGNE DE CODE EN LANGAGE MACHINE ------------------------ */ /* Crée une ligne de représentation de code binaire. */ rendering_line *create_code_line(asm_instr *, uint64_t, const disass_options *); #endif /* _ANALYSIS_LINE_H */