diff options
Diffstat (limited to 'src/analysis')
-rw-r--r-- | src/analysis/binary-int.h | 2 | ||||
-rw-r--r-- | src/analysis/binary.c | 22 | ||||
-rw-r--r-- | src/analysis/binary.h | 17 |
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); |