summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-07-31 06:29:40 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-07-31 06:29:40 (GMT)
commita2eb5483fe74923e488013b2d8b94ded6340499e (patch)
treeae41a0c63e6b09ee3f878f5889d6ef8accfed7df /src/analysis
parenta5d8e3fc30cda2e13d30f099e93ab1b182fdc0bd (diff)
Merged two equal binary views enumerations.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@386 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/binary-int.h2
-rw-r--r--src/analysis/binary.c22
-rw-r--r--src/analysis/binary.h17
3 files changed, 22 insertions, 19 deletions
diff --git a/src/analysis/binary-int.h b/src/analysis/binary-int.h
index 8aa2e83..6361a0c 100644
--- a/src/analysis/binary-int.h
+++ b/src/analysis/binary-int.h
@@ -75,7 +75,7 @@ struct _GLoadedBinary
size_t decbuf_count; /* Taille des tableaux */
size_t defsrc; /* Fichier source principal */
- bool text_display[BDT_COUNT][2]; /* Position et code binaire #1 */
+ bool text_display[BVW_COUNT][2]; /* Position et code binaire #1 */
bool lines_display; /* Affichage des lignes */
};
diff --git a/src/analysis/binary.c b/src/analysis/binary.c
index a9379e9..83e81d8 100644
--- a/src/analysis/binary.c
+++ b/src/analysis/binary.c
@@ -143,10 +143,12 @@ static void g_loaded_binary_init(GLoadedBinary *binary)
binary->storages[DBF_SEGMENTS_DISPLAY] = DBS_ALL_LOCAL;
binary->storages[DBF_BOOKMARKS] = DBS_ALL_LOCAL;
- binary->text_display[BDT_ASM][0] = true;
- binary->text_display[BDT_ASM][1] = true;
- binary->text_display[BDT_GRAPH][0] = false;
- binary->text_display[BDT_GRAPH][1] = false;
+ binary->text_display[BVW_BLOCK][0] = true;
+ binary->text_display[BVW_BLOCK][1] = true;
+ binary->text_display[BVW_BLOCK][2] = true;
+ binary->text_display[BVW_GRAPH][0] = false;
+ binary->text_display[BVW_GRAPH][1] = false;
+ binary->text_display[BVW_GRAPH][2] = false;
binary->lines_display = true;
@@ -1109,7 +1111,7 @@ GCodeBuffer *g_loaded_binary_get_disassembled_buffer(const GLoadedBinary *binary
/******************************************************************************
* *
* Paramètres : binary = élément binaire à consulter. *
-* type = type de représentation visée. *
+* view = type de représentation visée. *
* *
* Description : Indique si les adresses doivent apparaître dans le rendu. *
* *
@@ -1119,9 +1121,9 @@ GCodeBuffer *g_loaded_binary_get_disassembled_buffer(const GLoadedBinary *binary
* *
******************************************************************************/
-bool *g_loaded_binary_display_addresses_in_text(GLoadedBinary *binary, BinaryDisplayType type)
+bool *g_loaded_binary_display_addresses_in_text(GLoadedBinary *binary, BinaryView view)
{
- return &binary->text_display[type][0];
+ return &binary->text_display[view][0];
}
@@ -1129,7 +1131,7 @@ bool *g_loaded_binary_display_addresses_in_text(GLoadedBinary *binary, BinaryDis
/******************************************************************************
* *
* Paramètres : binary = élément binaire à consulter. *
-* type = type de représentation visée. *
+* view = type de représentation visée. *
* *
* Description : Indique si le code doit apparaître dans le rendu. *
* *
@@ -1139,9 +1141,9 @@ bool *g_loaded_binary_display_addresses_in_text(GLoadedBinary *binary, BinaryDis
* *
******************************************************************************/
-bool *g_loaded_binary_display_code_in_text(GLoadedBinary *binary, BinaryDisplayType type)
+bool *g_loaded_binary_display_code_in_text(GLoadedBinary *binary, BinaryView view)
{
- return &binary->text_display[type][1];
+ return &binary->text_display[view][1];
}
diff --git a/src/analysis/binary.h b/src/analysis/binary.h
index f3e2d09..dbadd64 100644
--- a/src/analysis/binary.h
+++ b/src/analysis/binary.h
@@ -62,15 +62,16 @@ typedef enum _BinaryPartModel
} BinaryPartModel;
-/* Types de représentation */
-typedef enum _BinaryDisplayType
+/* Type de représentations */
+typedef enum _BinaryView
{
- BDT_ASM, /* Rendu du code brut */
- BDT_GRAPH, /* Rendu avec graphiques */
+ BVW_BLOCK, /* Version basique */
+ BVW_GRAPH, /* Affichage en graphique */
+ BVW_SOURCE, /* Code décompilé */
- BDT_COUNT
+ BVW_COUNT
-} BinaryDisplayType;
+} BinaryView;
/* Indique le type défini pour une description de fichier binaire. */
@@ -138,10 +139,10 @@ GArchInstruction *g_loaded_binary_get_instructions(const GLoadedBinary *);
GCodeBuffer *g_loaded_binary_get_disassembled_buffer(const GLoadedBinary *);
/* Indique si les adresses doivent apparaître dans le rendu. */
-bool *g_loaded_binary_display_addresses_in_text(GLoadedBinary *, BinaryDisplayType);
+bool *g_loaded_binary_display_addresses_in_text(GLoadedBinary *, BinaryView);
/* Indique si le code doit apparaître dans le rendu. */
-bool *g_loaded_binary_display_code_in_text(GLoadedBinary *, BinaryDisplayType);
+bool *g_loaded_binary_display_code_in_text(GLoadedBinary *, BinaryView);
/* Fournit le tampon associé au contenu d'un fichier source. */
GCodeBuffer *g_loaded_binary_get_decompiled_buffer(const GLoadedBinary *, size_t);