diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Makefile.am | 3 | ||||
-rw-r--r-- | plugins/pychrysa/analysis/binary.c | 16 | ||||
-rw-r--r-- | plugins/pychrysa/glibext/Makefile.am | 2 | ||||
-rw-r--r-- | plugins/pychrysa/glibext/buffercache.c (renamed from plugins/pychrysa/glibext/codebuffer.c) | 40 | ||||
-rw-r--r-- | plugins/pychrysa/glibext/buffercache.h (renamed from plugins/pychrysa/glibext/codebuffer.h) | 12 | ||||
-rw-r--r-- | plugins/pychrysa/glibext/module.c | 4 | ||||
-rw-r--r-- | plugins/pychrysa/gtkext/Makefile.am | 4 | ||||
-rw-r--r-- | plugins/pychrysa/gtkext/blockdisplay.c (renamed from plugins/pychrysa/gtkext/blockview.c) | 37 | ||||
-rw-r--r-- | plugins/pychrysa/gtkext/blockdisplay.h (renamed from plugins/pychrysa/gtkext/bufferview.h) | 14 | ||||
-rw-r--r-- | plugins/pychrysa/gtkext/bufferdisplay.c (renamed from plugins/pychrysa/gtkext/bufferview.c) | 35 | ||||
-rw-r--r-- | plugins/pychrysa/gtkext/bufferdisplay.h (renamed from plugins/pychrysa/gtkext/blockview.h) | 14 | ||||
-rw-r--r-- | plugins/pychrysa/gtkext/module.c | 8 | ||||
-rw-r--r-- | plugins/ropgadgets/select.c | 23 |
13 files changed, 103 insertions, 109 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 0500b07..9b5cd17 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -3,4 +3,5 @@ if HAVE_PYTHON3_CONFIG PYTHON3_SUBDIRS = pychrysa python endif -SUBDIRS = androhelpers devdbg libcsem mobicore $(PYTHON3_SUBDIRS) readdex readelf ropgadgets stackvars +# androhelpers +SUBDIRS = devdbg libcsem mobicore $(PYTHON3_SUBDIRS) readdex readelf ropgadgets stackvars diff --git a/plugins/pychrysa/analysis/binary.c b/plugins/pychrysa/analysis/binary.c index 32e4a71..5b857d5 100644 --- a/plugins/pychrysa/analysis/binary.c +++ b/plugins/pychrysa/analysis/binary.c @@ -55,7 +55,7 @@ static PyObject *py_loaded_binary_get_format(PyObject *, void *); static PyObject *py_loaded_binary_get_processor(PyObject *, void *); /* Fournit le tampon associé au contenu assembleur d'un binaire. */ -static PyObject *py_loaded_binary_get_disassembled_buffer(PyObject *, void *); +static PyObject *py_loaded_binary_get_disassembled_cache(PyObject *, void *); @@ -234,16 +234,18 @@ static PyObject *py_loaded_binary_get_processor(PyObject *self, void *closure) * * ******************************************************************************/ -static PyObject *py_loaded_binary_get_disassembled_buffer(PyObject *self, void *closure) +static PyObject *py_loaded_binary_get_disassembled_cache(PyObject *self, void *closure) { PyObject *result; /* Trouvailles à retourner */ GLoadedBinary *binary; /* Version native */ - GCodeBuffer *buffer; /* Tampon à récupérer */ + GBufferCache *cache; /* Tampon à récupérer */ binary = G_LOADED_BINARY(pygobject_get(self)); - buffer = g_loaded_binary_get_disassembled_buffer(binary); + cache = g_loaded_binary_get_disassembled_cache(binary); - result = pygobject_new(G_OBJECT(buffer)); + result = pygobject_new(G_OBJECT(cache)); + + g_object_unref(G_OBJECT(cache)); return result; @@ -288,8 +290,8 @@ PyTypeObject *get_python_loaded_binary_type(void) "Handler for the current binary processor.", NULL }, { - "disassembled_buffer", py_loaded_binary_get_disassembled_buffer, NULL, - "Disassembled code buffer.", NULL + "disassembled_cache", py_loaded_binary_get_disassembled_cache, NULL, + "Disassembled buffer cache.", NULL }, { NULL } }; diff --git a/plugins/pychrysa/glibext/Makefile.am b/plugins/pychrysa/glibext/Makefile.am index 74def8a..b53f4b0 100644 --- a/plugins/pychrysa/glibext/Makefile.am +++ b/plugins/pychrysa/glibext/Makefile.am @@ -2,8 +2,8 @@ noinst_LTLIBRARIES = libpychrysaglibext.la libpychrysaglibext_la_SOURCES = \ + buffercache.h buffercache.c \ bufferline.h bufferline.c \ - codebuffer.h codebuffer.c \ configuration.h configuration.c \ module.h module.c diff --git a/plugins/pychrysa/glibext/codebuffer.c b/plugins/pychrysa/glibext/buffercache.c index 7ca9435..c79fda2 100644 --- a/plugins/pychrysa/glibext/codebuffer.c +++ b/plugins/pychrysa/glibext/buffercache.c @@ -1,6 +1,6 @@ /* Chrysalide - Outil d'analyse de fichiers binaires - * codebuffer.c - équivalent Python du fichier "glibext/gcodebuffer.h" + * buffercache.c - équivalent Python du fichier "glibext/gbuffercache.h" * * Copyright (C) 2012 Cyrille Bagard * @@ -22,13 +22,13 @@ */ -#include "codebuffer.h" +#include "buffercache.h" #include <pygobject.h> -#include <glibext/gcodebuffer.h> +#include <glibext/gbuffercache.h> #include "../arch/vmpa.h" @@ -36,6 +36,7 @@ +#if 0 /* Retrouve une ligne au sein d'un tampon avec une adresse. */ static PyObject *py_code_buffer_find_line_by_addr(PyObject *, PyObject *); @@ -60,7 +61,7 @@ static PyObject *py_code_buffer_find_line_by_addr(PyObject *self, PyObject *args PyObject *py_vmpa; /* Localisation version Python */ int ret; /* Bilan de lecture des args. */ vmpa2t *addr; /* Adresse visée par l'opérat° */ - GCodeBuffer *buffer; /* Version native */ + GBuffercache *buffer; /* Version native */ GBufferLine *line; /* Ligne trouvée */ ret = PyArg_ParseTuple(args, "O", &py_vmpa); @@ -82,6 +83,7 @@ static PyObject *py_code_buffer_find_line_by_addr(PyObject *self, PyObject *args return result; } +#endif /****************************************************************************** @@ -96,38 +98,40 @@ static PyObject *py_code_buffer_find_line_by_addr(PyObject *self, PyObject *args * * ******************************************************************************/ -PyTypeObject *get_python_code_buffer_type(void) +PyTypeObject *get_python_buffer_cache_type(void) { - static PyMethodDef py_code_buffer_methods[] = { + static PyMethodDef py_buffer_cache_methods[] = { +#if 0 { - "find_line_by_addr", (PyCFunction)py_code_buffer_find_line_by_addr, + "find_line_by_addr", (PyCFunction)py_buffer_cache_find_line_by_addr, METH_VARARGS, "find_line_by_addr($self, addr, /)\n--\n\nFind a buffer line with a given address." }, +#endif { NULL } }; - static PyGetSetDef py_code_buffer_getseters[] = { + static PyGetSetDef py_buffer_cache_getseters[] = { { NULL } }; - static PyTypeObject py_code_buffer_type = { + static PyTypeObject py_buffer_cache_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "pychrysalide.glibext.CodeBuffer", + .tp_name = "pychrysalide.glibext.Buffercache", .tp_basicsize = sizeof(PyGObject), .tp_flags = Py_TPFLAGS_DEFAULT, .tp_doc = "PyChrysalide code buffer", - .tp_methods = py_code_buffer_methods, - .tp_getset = py_code_buffer_getseters, + .tp_methods = py_buffer_cache_methods, + .tp_getset = py_buffer_cache_getseters, }; - return &py_code_buffer_type; + return &py_buffer_cache_type; } @@ -136,7 +140,7 @@ PyTypeObject *get_python_code_buffer_type(void) * * * Paramètres : module = module dont la définition est à compléter. * * * -* Description : Prend en charge l'objet 'pychrysalide.glibext.CodeBuffer'. * +* Description : Prend en charge l'objet 'pychrysalide.glibext.BufferCache'. * * * * Retour : Bilan de l'opération. * * * @@ -144,16 +148,16 @@ PyTypeObject *get_python_code_buffer_type(void) * * ******************************************************************************/ -bool register_python_code_buffer(PyObject *module) +bool register_python_buffer_cache(PyObject *module) { - PyTypeObject *py_code_buffer_type; /* Type Python 'CodeBuffer' */ + PyTypeObject *py_buffer_cache_type; /* Type Python 'BufferCache' */ PyObject *dict; /* Dictionnaire du module */ - py_code_buffer_type = get_python_code_buffer_type(); + py_buffer_cache_type = get_python_buffer_cache_type(); dict = PyModule_GetDict(module); - if (!register_class_for_pygobject(dict, G_TYPE_CODE_BUFFER, py_code_buffer_type, &PyGObject_Type)) + if (!register_class_for_pygobject(dict, G_TYPE_BUFFER_CACHE, py_buffer_cache_type, &PyGObject_Type)) return false; return true; diff --git a/plugins/pychrysa/glibext/codebuffer.h b/plugins/pychrysa/glibext/buffercache.h index e806e36..6476f5f 100644 --- a/plugins/pychrysa/glibext/codebuffer.h +++ b/plugins/pychrysa/glibext/buffercache.h @@ -1,6 +1,6 @@ /* Chrysalide - Outil d'analyse de fichiers binaires - * codebuffer.h - prototypes pour l'équivalent Python du fichier "glibext/codebuffer.h" + * buffercache.h - prototypes pour l'équivalent Python du fichier "glibext/buffercache.h" * * Copyright (C) 2012 Cyrille Bagard * @@ -22,8 +22,8 @@ */ -#ifndef _PLUGINS_PYCHRYSA_GLIBEXT_CODEBUFFER_H -#define _PLUGINS_PYCHRYSA_GLIBEXT_CODEBUFFER_H +#ifndef _PLUGINS_PYCHRYSA_GLIBEXT_BUFFERCACHE_H +#define _PLUGINS_PYCHRYSA_GLIBEXT_BUFFERCACHE_H #include <Python.h> @@ -32,11 +32,11 @@ /* Fournit un accès à une définition de type à diffuser. */ -PyTypeObject *get_python_code_buffer_type(void); +PyTypeObject *get_python_buffer_cache_type(void); /* Prend en charge l'objet 'pychrysalide.glibext.CodeBuffer'. */ -bool register_python_code_buffer(PyObject *); +bool register_python_buffer_cache(PyObject *); -#endif /* _PLUGINS_PYCHRYSA_GLIBEXT_CODEBUFFER_H */ +#endif /* _PLUGINS_PYCHRYSA_GLIBEXT_BUFFERCACHE_H */ diff --git a/plugins/pychrysa/glibext/module.c b/plugins/pychrysa/glibext/module.c index 2306c44..847e6d6 100644 --- a/plugins/pychrysa/glibext/module.c +++ b/plugins/pychrysa/glibext/module.c @@ -28,8 +28,8 @@ #include <assert.h> +#include "buffercache.h" #include "bufferline.h" -#include "codebuffer.h" #include "configuration.h" @@ -80,8 +80,8 @@ bool add_glibext_module_to_python_module(PyObject *super) result = true; + result &= register_python_buffer_cache(module); result &= register_python_buffer_line(module); - result &= register_python_code_buffer(module); result &= register_python_config_param(module); result &= register_python_config_param_iterator(module); result &= register_python_generic_config(module); diff --git a/plugins/pychrysa/gtkext/Makefile.am b/plugins/pychrysa/gtkext/Makefile.am index e7303e8..fee2032 100644 --- a/plugins/pychrysa/gtkext/Makefile.am +++ b/plugins/pychrysa/gtkext/Makefile.am @@ -2,8 +2,8 @@ noinst_LTLIBRARIES = libpychrysagtkext.la libpychrysagtkext_la_SOURCES = \ - blockview.h blockview.c \ - bufferview.h bufferview.c \ + blockdisplay.h blockdisplay.c \ + bufferdisplay.h bufferdisplay.c \ displaypanel.h displaypanel.c \ module.h module.c diff --git a/plugins/pychrysa/gtkext/blockview.c b/plugins/pychrysa/gtkext/blockdisplay.c index 73095b2..8262aa7 100644 --- a/plugins/pychrysa/gtkext/blockview.c +++ b/plugins/pychrysa/gtkext/blockdisplay.c @@ -1,6 +1,6 @@ /* Chrysalide - Outil d'analyse de fichiers binaires - * blockview.c - prototypes pour l'équivalent Python du fichier "gtkext/gtkblockview.c" + * blockdisplay.c - prototypes pour l'équivalent Python du fichier "gtkext/gtkblockdisplay.c" * * Copyright (C) 2012 Cyrille Bagard * @@ -22,16 +22,16 @@ */ -#include "blockview.h" +#include "blockdisplay.h" #include <pygobject.h> -#include <gtkext/gtkblockview.h> +#include <gtkext/gtkblockdisplay.h> -#include "bufferview.h" +#include "bufferdisplay.h" #include "../helpers.h" @@ -48,33 +48,33 @@ * * ******************************************************************************/ -PyTypeObject *get_python_block_view_type(void) +PyTypeObject *get_python_block_display_type(void) { - static PyMethodDef py_block_view_methods[] = { + static PyMethodDef py_block_display_methods[] = { { NULL } }; - static PyGetSetDef py_block_view_getseters[] = { + static PyGetSetDef py_block_display_getseters[] = { { NULL } }; - static PyTypeObject py_block_view_type = { + static PyTypeObject py_block_display_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "pychrysalide.gtkext.BlockView", + .tp_name = "pychrysalide.gtkext.BlockDisplay", .tp_basicsize = sizeof(PyGObject), .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_doc = "PyChrysalide block view.", + .tp_doc = "PyChrysalide block display.", - .tp_methods = py_block_view_methods, - .tp_getset = py_block_view_getseters + .tp_methods = py_block_display_methods, + .tp_getset = py_block_display_getseters }; - return &py_block_view_type; + return &py_block_display_type; } @@ -83,7 +83,7 @@ PyTypeObject *get_python_block_view_type(void) * * * Paramètres : module = module dont la définition est à compléter. * * * -* Description : Prend en charge l'objet 'pychrysalide.gtkext.BlockView'. * +* Description : Prend en charge l'objet 'pychrysalide.gtkext.BlockDisplay'. * * * * Retour : Bilan de l'opération. * * * @@ -91,16 +91,17 @@ PyTypeObject *get_python_block_view_type(void) * * ******************************************************************************/ -bool register_python_block_view(PyObject *module) +bool register_python_block_display(PyObject *module) { - PyTypeObject *py_block_view_type; /* Type Python 'BlockView' */ + PyTypeObject *py_block_display_type; /* Type Python 'BlockDisplay' */ PyObject *dict; /* Dictionnaire du module */ - py_block_view_type = get_python_block_view_type(); + py_block_display_type = get_python_block_display_type(); dict = PyModule_GetDict(module); - if (!register_class_for_pygobject(dict, GTK_TYPE_BLOCK_VIEW, py_block_view_type, get_python_buffer_view_type())) + if (!register_class_for_pygobject(dict, GTK_TYPE_BLOCK_DISPLAY, + py_block_display_type, get_python_buffer_display_type())) return false; return true; diff --git a/plugins/pychrysa/gtkext/bufferview.h b/plugins/pychrysa/gtkext/blockdisplay.h index d4a1581..1a45e15 100644 --- a/plugins/pychrysa/gtkext/bufferview.h +++ b/plugins/pychrysa/gtkext/blockdisplay.h @@ -1,6 +1,6 @@ /* Chrysalide - Outil d'analyse de fichiers binaires - * bufferview.h - prototypes pour l'équivalent Python du fichier "gtkext/gtkbufferview.h" + * blockdisplay.h - prototypes pour l'équivalent Python du fichier "gtkext/gtkblockdisplay.h" * * Copyright (C) 2012 Cyrille Bagard * @@ -22,8 +22,8 @@ */ -#ifndef _PLUGINS_PYCHRYSA_GTKEXT_BUFFERVIEW_H -#define _PLUGINS_PYCHRYSA_GTKEXT_BUFFERVIEW_H +#ifndef _PLUGINS_PYCHRYSA_GTKEXT_BLOCKDISPLAY_H +#define _PLUGINS_PYCHRYSA_GTKEXT_BLOCKDISPLAY_H #include <Python.h> @@ -32,11 +32,11 @@ /* Fournit un accès à une définition de type à diffuser. */ -PyTypeObject *get_python_buffer_view_type(void); +PyTypeObject *get_python_block_display_type(void); -/* Prend en charge l'objet 'pychrysalide.gtkext.Bufferview'. */ -bool register_python_buffer_view(PyObject *module); +/* Prend en charge l'objet 'pychrysalide.gtkext.BlockDisplay'. */ +bool register_python_block_display(PyObject *module); -#endif /* _PLUGINS_PYCHRYSA_GTKEXT_BUFFERVIEW_H */ +#endif /* _PLUGINS_PYCHRYSA_GTKEXT_BLOCKDISPLAY_H */ diff --git a/plugins/pychrysa/gtkext/bufferview.c b/plugins/pychrysa/gtkext/bufferdisplay.c index 3be54fd..d26d9d9 100644 --- a/plugins/pychrysa/gtkext/bufferview.c +++ b/plugins/pychrysa/gtkext/bufferdisplay.c @@ -1,6 +1,6 @@ /* Chrysalide - Outil d'analyse de fichiers binaires - * bufferview.c - prototypes pour l'équivalent Python du fichier "gtkext/gtkbufferview.c" + * bufferdisplay.c - prototypes pour l'équivalent Python du fichier "gtkext/gtkbufferdisplay.c" * * Copyright (C) 2012 Cyrille Bagard * @@ -22,13 +22,13 @@ */ -#include "bufferview.h" +#include "bufferdisplay.h" #include <pygobject.h> -#include <gtkext/gtkbufferview.h> +#include <gtkext/gtkbufferdisplay.h> #include "displaypanel.h" @@ -48,33 +48,33 @@ * * ******************************************************************************/ -PyTypeObject *get_python_buffer_view_type(void) +PyTypeObject *get_python_buffer_display_type(void) { - static PyMethodDef py_buffer_view_methods[] = { + static PyMethodDef py_buffer_display_methods[] = { { NULL } }; - static PyGetSetDef py_buffer_view_getseters[] = { + static PyGetSetDef py_buffer_display_getseters[] = { { NULL } }; - static PyTypeObject py_buffer_view_type = { + static PyTypeObject py_buffer_display_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "pychrysalide.gtkext.Bufferview", + .tp_name = "pychrysalide.gtkext.BufferDisplay", .tp_basicsize = sizeof(PyGObject), .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_doc = "PyChrysalide buffer view.", + .tp_doc = "PyChrysalide buffer display.", - .tp_methods = py_buffer_view_methods, - .tp_getset = py_buffer_view_getseters + .tp_methods = py_buffer_display_methods, + .tp_getset = py_buffer_display_getseters }; - return &py_buffer_view_type; + return &py_buffer_display_type; } @@ -83,7 +83,7 @@ PyTypeObject *get_python_buffer_view_type(void) * * * Paramètres : module = module dont la définition est à compléter. * * * -* Description : Prend en charge l'objet 'pychrysalide.gtkext.Bufferview'. * +* Description : Prend en charge l'objet 'pychrysalide.gtkext.Bufferdisplay'. * * * * Retour : Bilan de l'opération. * * * @@ -91,16 +91,17 @@ PyTypeObject *get_python_buffer_view_type(void) * * ******************************************************************************/ -bool register_python_buffer_view(PyObject *module) +bool register_python_buffer_display(PyObject *module) { - PyTypeObject *py_buffer_view_type; /* Type Python 'Bufferview' */ + PyTypeObject *py_buffer_display_type; /* Type Python 'Bufferdisplay' */ PyObject *dict; /* Dictionnaire du module */ - py_buffer_view_type = get_python_buffer_view_type(); + py_buffer_display_type = get_python_buffer_display_type(); dict = PyModule_GetDict(module); - if (!register_class_for_pygobject(dict, GTK_TYPE_BUFFER_VIEW, py_buffer_view_type, get_python_display_panel_type())) + if (!register_class_for_pygobject(dict, GTK_TYPE_BUFFER_DISPLAY, + py_buffer_display_type, get_python_display_panel_type())) return false; return true; diff --git a/plugins/pychrysa/gtkext/blockview.h b/plugins/pychrysa/gtkext/bufferdisplay.h index acb97a9..332f402 100644 --- a/plugins/pychrysa/gtkext/blockview.h +++ b/plugins/pychrysa/gtkext/bufferdisplay.h @@ -1,6 +1,6 @@ /* Chrysalide - Outil d'analyse de fichiers binaires - * blockview.h - prototypes pour l'équivalent Python du fichier "gtkext/gtkblockview.h" + * bufferdisplay.h - prototypes pour l'équivalent Python du fichier "gtkext/gtkbufferdisplay.h" * * Copyright (C) 2012 Cyrille Bagard * @@ -22,8 +22,8 @@ */ -#ifndef _PLUGINS_PYCHRYSA_GTKEXT_BLOCKVIEW_H -#define _PLUGINS_PYCHRYSA_GTKEXT_BLOCKVIEW_H +#ifndef _PLUGINS_PYCHRYSA_GTKEXT_BUFFERDISPLAY_H +#define _PLUGINS_PYCHRYSA_GTKEXT_BUFFERDISPLAY_H #include <Python.h> @@ -32,11 +32,11 @@ /* Fournit un accès à une définition de type à diffuser. */ -PyTypeObject *get_python_block_view_type(void); +PyTypeObject *get_python_buffer_display_type(void); -/* Prend en charge l'objet 'pychrysalide.gtkext.BlockView'. */ -bool register_python_block_view(PyObject *module); +/* Prend en charge l'objet 'pychrysalide.gtkext.BufferDisplay'. */ +bool register_python_buffer_display(PyObject *module); -#endif /* _PLUGINS_PYCHRYSA_GTKEXT_BLOCKVIEW_H */ +#endif /* _PLUGINS_PYCHRYSA_GTKEXT_BUFFERDISPLAY_H */ diff --git a/plugins/pychrysa/gtkext/module.c b/plugins/pychrysa/gtkext/module.c index 2230ed0..d826814 100644 --- a/plugins/pychrysa/gtkext/module.c +++ b/plugins/pychrysa/gtkext/module.c @@ -28,8 +28,8 @@ #include <assert.h> -#include "blockview.h" -#include "bufferview.h" +#include "blockdisplay.h" +#include "bufferdisplay.h" #include "displaypanel.h" @@ -81,8 +81,8 @@ bool add_gtkext_module_to_python_module(PyObject *super) result = true; result &= register_python_display_panel(module); - result &= register_python_buffer_view(module); - result &= register_python_block_view(module); + result &= register_python_buffer_display(module); + result &= register_python_block_display(module); agmtpm_exit: diff --git a/plugins/ropgadgets/select.c b/plugins/ropgadgets/select.c index 881cd39..0fedfb1 100644 --- a/plugins/ropgadgets/select.c +++ b/plugins/ropgadgets/select.c @@ -1746,11 +1746,7 @@ static gboolean filter_visible_rop_gadgets(GtkTreeModel *model, GtkTreeIter *ite static void add_new_gadgets_for_category(GExeFormat *format, GtkComboBoxText *combo, GtkTreeStore *store, const char *category, GArchInstruction **gadgets, size_t count) { - const char *target; /* Sous-traitance requise */ - GArchProcessor *proc; /* Architecture du binaire */ - MemoryDataSize msize; /* Taille du bus d'adresses */ const GBinContent *content; /* Contenu binaire global */ - GCodeBuffer *buffer; /* Tampon de rassemblement */ size_t i; /* Boucle de parcours */ GArchInstruction *instr; /* Elément de liste de gadgets */ GBufferLine *line; /* Ligne présente à l'adresse */ @@ -1762,21 +1758,10 @@ static void add_new_gadgets_for_category(GExeFormat *format, GtkComboBoxText *co char *content_markup; /* Contenu assemblé de chaîne */ GtkTreeIter iter; /* Point d'insertion */ - /* Définition de l'écosystème nécessaire */ - - target = g_exe_format_get_target_machine(format); - proc = get_arch_processor_for_type(target); - - msize = g_arch_processor_get_memory_size(proc); - - g_object_unref(G_OBJECT(proc)); - content = g_binary_format_get_content(G_BIN_FORMAT(format)); /* Conversion en contenu textuel */ - buffer = g_code_buffer_new(BLC_ASSEMBLY); - for (i = 0; i < count; i++) { /* Parcours des différentes lignes */ @@ -1788,8 +1773,8 @@ static void add_new_gadgets_for_category(GExeFormat *format, GtkComboBoxText *co for (instr = gadgets[i]; instr != NULL; instr = g_arch_instruction_get_next_iter(gadgets[i], instr, ~0)) { - line = g_arch_instruction_print(instr, buffer, msize, content, ASX_INTEL); - if (line == NULL) continue; + line = g_buffer_line_new(NULL, BLC_ASSEMBLY); + g_line_generator_print(G_LINE_GENERATOR(instr), line, -1, 0); if (instr == gadgets[i]) { @@ -1800,6 +1785,8 @@ static void add_new_gadgets_for_category(GExeFormat *format, GtkComboBoxText *co partial_raw = g_buffer_line_get_text(line, BLC_ASSEMBLY_HEAD, BLC_COUNT, false); partial_markup = g_buffer_line_get_text(line, BLC_ASSEMBLY_HEAD, BLC_COUNT, true); + g_object_unref(G_OBJECT(line)); + if (content_raw != NULL) content_raw = stradd(content_raw, " ; "); @@ -1836,8 +1823,6 @@ static void add_new_gadgets_for_category(GExeFormat *format, GtkComboBoxText *co } - g_object_unref(G_OBJECT(buffer)); - g_object_unref(G_OBJECT(content)); /* Rajout de la catégorie et filtre au besoin */ |