/* OpenIDA - Outil d'analyse de fichiers binaires * prototype.h - prototypes pour la manipulation des prototypes de fonctions et de variables * * 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_PROTOTYPE_H #define _ANALYSIS_PROTOTYPE_H #include #include "variable.h" /* Type de routine traitée */ typedef enum _RoutineType { RTT_CLASSIC, /* Fonction ou méthode */ RTT_CONSTRUCTOR, /* Constructeur */ RTT_DESTRUCTOR /* Destructeur */ } RoutineType; /* Variable représentant un prototype de routine */ typedef struct _bin_routine bin_routine; /* Crée une représentation de routine. */ bin_routine *create_binary_routine(void); /* Supprime une représentation de routine de la mémoire. */ void delete_binary_routine(bin_routine *); /* Définit la position physique / en mémoire d'une routine. */ void set_binary_routine_offset(bin_routine *, uint64_t); /* Fournit la position physique / en mémoire d'une routine. */ uint64_t get_binary_routine_offset(const bin_routine *); /* Définit le type d'une routine. */ void set_binary_routine_type(bin_routine *, RoutineType); /* Définit le nom humain d'une routine. */ void set_binary_routine_name(bin_routine *, char *); /* Définit le type de retour d'une routine. */ void set_binary_routine_return_type(bin_routine *, variable *); /* Ajoute un argument à une routine. */ void add_arg_to_binary_routine(bin_routine *, variable *); /* Décrit le prototype de la routine sous forme de caractères. */ char *routine_to_string(const bin_routine *); #endif /* _ANALYSIS_PROTOTYPE_H */