diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2009-03-08 22:05:09 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2009-03-08 22:05:09 (GMT) |
commit | 29a22c425f492427f45b71de937f2d99587c8d34 (patch) | |
tree | 36e8bb3ef73bc91e812ed63205d10bfced578660 /src/analysis/prototype.h | |
parent | 674739bedc853681be5a2657a7a4f497d6e82c9b (diff) |
Added a partial support of the Itanium C++ ABI mangling.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@52 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/prototype.h')
-rw-r--r-- | src/analysis/prototype.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/analysis/prototype.h b/src/analysis/prototype.h new file mode 100644 index 0000000..f86d541 --- /dev/null +++ b/src/analysis/prototype.h @@ -0,0 +1,69 @@ + +/* 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 <http://www.gnu.org/licenses/>. + */ + + +#ifndef _ANALYSIS_PROTOTYPE_H +#define _ANALYSIS_PROTOTYPE_H + + +#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 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 */ |