summaryrefslogtreecommitdiff
path: root/src/analysis/binary.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/binary.c')
-rw-r--r--src/analysis/binary.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c
index 3af62cf..ac8863e 100644
--- a/src/analysis/binary.c
+++ b/src/analysis/binary.c
@@ -37,7 +37,7 @@
#include "routine.h"
#include "db/client.h"
-#include "decomp/decompiler.h"
+//#include "decomp/decompiler.h"
#include "disass/disassembler.h"
#include "../common/extstr.h"
#include "../common/cpp.h"
@@ -78,8 +78,9 @@ struct _GLoadedBinary
GDbgFormat *debug; /* Informations de débogage */ //// REMME
GArchProcessor *proc; /* Architecture du binaire */
- GCodeBuffer *disass_buffer; /* Instructions lisibles */
- GCodeBuffer **dec_buffers; /* Sources sous forme de texte */
+
+ GBufferCache *disass_cache; /* Instructions lisibles */
+ //GCodeBuffer **dec_buffers; /* Sources sous forme de texte */
size_t decbuf_count; /* Taille des tableaux */
size_t defsrc; /* Fichier source principal */
@@ -220,9 +221,6 @@ static void g_loaded_binary_init(GLoadedBinary *binary)
binary->col_display[BVW_GRAPH][BLC_PHYSICAL] = false;
binary->col_display[BVW_GRAPH][BLC_VIRTUAL] = false;
binary->col_display[BVW_GRAPH][BLC_BINARY] = false;
- binary->col_display[BVW_SOURCE][BLC_PHYSICAL] = false;
- binary->col_display[BVW_SOURCE][BLC_VIRTUAL] = false;
- binary->col_display[BVW_SOURCE][BLC_BINARY] = false;
binary->lines_display = true;
@@ -1377,7 +1375,7 @@ void g_loaded_binary_analyse(GLoadedBinary *binary)
g_loaded_binary_connect_internal(binary);
- disassemble_binary(binary, &binary->disass_buffer, ack_completed_disassembly);
+ disassemble_binary(binary, &binary->disass_cache, ack_completed_disassembly);
@@ -1508,9 +1506,16 @@ GArchProcessor *g_loaded_binary_get_processor(const GLoadedBinary *binary)
* *
******************************************************************************/
-GCodeBuffer *g_loaded_binary_get_disassembled_buffer(const GLoadedBinary *binary)
+GBufferCache *g_loaded_binary_get_disassembled_cache(const GLoadedBinary *binary)
{
- return binary->disass_buffer;
+ GBufferCache *result; /* Instance à retourner */
+
+ result = binary->disass_cache;
+
+ if (result != NULL)
+ g_object_ref(G_OBJECT(result));
+
+ return result;
}
@@ -1527,7 +1532,7 @@ GCodeBuffer *g_loaded_binary_get_disassembled_buffer(const GLoadedBinary *binary
* Remarques : - *
* *
******************************************************************************/
-
+#if 0
GCodeBuffer *g_loaded_binary_get_decompiled_buffer(const GLoadedBinary *binary, size_t index)
{
GCodeBuffer *result; /* Tampon à retourner */
@@ -1544,6 +1549,7 @@ GCodeBuffer *g_loaded_binary_get_decompiled_buffer(const GLoadedBinary *binary,
return result;
}
+#endif
/******************************************************************************
@@ -1659,6 +1665,7 @@ void ack_completed_disassembly(GDelayedDisassembly *disass, GLoadedBinary *binar
files = g_binary_format_get_source_files(G_BIN_FORMAT(binary->format),
&binary->decbuf_count, &binary->defsrc);
+#if 0
if (binary->decbuf_count > 0)
{
binary->dec_buffers = (GCodeBuffer **)calloc(binary->decbuf_count, sizeof(GCodeBuffer *));
@@ -1668,7 +1675,7 @@ void ack_completed_disassembly(GDelayedDisassembly *disass, GLoadedBinary *binar
binary->dec_buffers[i] = decompile_all_from_file(binary, files[i]);
*/
}
-
+#endif