diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-07-24 21:53:29 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-07-24 21:53:29 (GMT) |
commit | 0bd8f885b20c1d660507c62e35410e2e5a958066 (patch) | |
tree | 10c92cdaa52235f9f4ab1b7b4a51b881a7eba800 /src/analysis/db/item.c | |
parent | 156d2e2f6beda2302552ac79678494d914fda05b (diff) |
Applied or canceled the effect of collected items on a given binary.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@556 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/db/item.c')
-rw-r--r-- | src/analysis/db/item.c | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/analysis/db/item.c b/src/analysis/db/item.c index 746ca27..d2f87c3 100644 --- a/src/analysis/db/item.c +++ b/src/analysis/db/item.c @@ -361,6 +361,62 @@ bool g_db_item_send(const GDbItem *item, int fd, int flags) /****************************************************************************** * * +* Paramètres : item = élément de collection à manipuler. * +* binary = binaire chargé en mémoire à modifier. * +* * +* Description : Applique un élément de collection sur un binaire. * +* * +* Retour : Bilan de l'opération. * +* * +* Remarques : - * +* * +******************************************************************************/ + +bool g_db_item_apply(GDbItem *item, GLoadedBinary *binary) +{ + bool result; /* Bilan à faire remonter */ + + result = G_DB_ITEM_GET_CLASS(item)->apply(item, binary); + +#ifdef DEBUG + item->applied = true; +#endif + + return result; + +} + + +/****************************************************************************** +* * +* Paramètres : item = élément de collection à manipuler. * +* binary = binaire chargé en mémoire à modifier. * +* * +* Description : Annule une bascule d'affichage d'opérande sur un binaire. * +* * +* Retour : Bilan de l'opération. * +* * +* Remarques : - * +* * +******************************************************************************/ + +bool g_db_item_cancel(GDbItem *item, GLoadedBinary *binary) +{ + bool result; /* Bilan à faire remonter */ + +#ifdef DEBUG + assert(item->applied); +#endif + + result = G_DB_ITEM_GET_CLASS(item)->cancel(item, binary); + + return result; + +} + + +/****************************************************************************** +* * * Paramètres : item = base d'éléments à modifier. * * is_volatile = état du besoin en sauvegarde. * * * |