diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2024-05-19 22:55:29 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2024-05-19 22:55:29 (GMT) |
commit | 79662ede83b35ad9d91b942218cf09e856e48b4c (patch) | |
tree | a2bd2c2e7070aeda9cf2eb97f867cf3ff1b7c92a /plugins/pychrysalide/arch | |
parent | 49ae908b6aa3c8c6bca2c79b0a68f587f51b600f (diff) |
Restore full featured Python bindings for binary contents.
Diffstat (limited to 'plugins/pychrysalide/arch')
-rw-r--r-- | plugins/pychrysalide/arch/Makefile.am | 40 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/constants.c | 8 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/constants.h | 5 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/module.c | 11 |
4 files changed, 47 insertions, 17 deletions
diff --git a/plugins/pychrysalide/arch/Makefile.am b/plugins/pychrysalide/arch/Makefile.am index c113f6e..d3ee3f0 100644 --- a/plugins/pychrysalide/arch/Makefile.am +++ b/plugins/pychrysalide/arch/Makefile.am @@ -1,22 +1,36 @@ -noinst_LTLIBRARIES = libpychrysaarch.la +noinst_LTLIBRARIES = libpychrysaarch4.la # libpychrysaarch.la -libpychrysaarch_la_SOURCES = \ +# libpychrysaarch_la_SOURCES = \ +# constants.h constants.c \ +# context.h context.c \ +# instriter.h instriter.c \ +# instruction.h instruction.c \ +# module.h module.c \ +# operand.h operand.c \ +# processor.h processor.c \ +# register.h register.c \ +# vmpa.h vmpa.c + +# libpychrysaarch_la_LIBADD = \ +# instructions/libpychrysaarchinstructions.la \ +# operands/libpychrysaarchoperands.la + +# libpychrysaarch_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ +# -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT + + +libpychrysaarch4_la_SOURCES = \ constants.h constants.c \ - context.h context.c \ - instriter.h instriter.c \ - instruction.h instruction.c \ module.h module.c \ - operand.h operand.c \ - processor.h processor.c \ - register.h register.c \ vmpa.h vmpa.c -libpychrysaarch_la_LIBADD = \ - instructions/libpychrysaarchinstructions.la \ - operands/libpychrysaarchoperands.la +# libpychrysaarch4_la_LIBADD = \ +# instructions/libpychrysaarchinstructions.la \ +# operands/libpychrysaarchoperands.la -libpychrysaarch_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ +libpychrysaarch4_la_CFLAGS = $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + $(TOOLKIT_CFLAGS) \ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT @@ -25,4 +39,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libpychrysaarch_la_SOURCES:%c=) -SUBDIRS = instructions operands +# SUBDIRS = instructions operands diff --git a/plugins/pychrysalide/arch/constants.c b/plugins/pychrysalide/arch/constants.c index 0402b03..3604795 100644 --- a/plugins/pychrysalide/arch/constants.c +++ b/plugins/pychrysalide/arch/constants.c @@ -25,14 +25,15 @@ #include "constants.h" -#include <arch/instruction.h> -#include <arch/processor.h> +//#include <arch/instruction.h> +//#include <arch/processor.h> #include <arch/vmpa.h> #include "../helpers.h" +#if 0 // FIXME /****************************************************************************** * * @@ -207,6 +208,7 @@ int convert_to_arch_processing_error(PyObject *arg, void *dst) return result; } +#endif /****************************************************************************** @@ -247,6 +249,7 @@ bool define_arch_vmpa_constants(PyTypeObject *type) } +#if 0 // FIXME /****************************************************************************** * * * Paramètres : type = type dont le dictionnaire est à compléter. * @@ -343,3 +346,4 @@ int convert_to_disass_priority_level(PyObject *arg, void *dst) return result; } +#endif diff --git a/plugins/pychrysalide/arch/constants.h b/plugins/pychrysalide/arch/constants.h index 03efc82..b12579e 100644 --- a/plugins/pychrysalide/arch/constants.h +++ b/plugins/pychrysalide/arch/constants.h @@ -30,7 +30,7 @@ #include <stdbool.h> - +#if 0 // FIXME /* Définit les constantes relatives aux instructions. */ bool define_arch_instruction_constants(PyTypeObject *); @@ -39,15 +39,18 @@ bool define_arch_processor_constants(PyTypeObject *); /* Tente de convertir en constante ArchProcessingError. */ int convert_to_arch_processing_error(PyObject *, void *); +#endif /* Définit les constantes relatives aux emplacements. */ bool define_arch_vmpa_constants(PyTypeObject *); +#if 0 // FIXME /* Définit les constantes relatives aux contextes. */ bool define_proc_context_constants(PyTypeObject *); /* Tente de convertir en constante DisassPriorityLevel. */ int convert_to_disass_priority_level(PyObject *, void *); +#endif diff --git a/plugins/pychrysalide/arch/module.c b/plugins/pychrysalide/arch/module.c index d0bc1f5..bbdaf76 100644 --- a/plugins/pychrysalide/arch/module.c +++ b/plugins/pychrysalide/arch/module.c @@ -29,18 +29,21 @@ #include <arch/archbase.h> -#include <common/endianness.h> +/* #include "context.h" #include "instriter.h" #include "instruction.h" #include "operand.h" #include "processor.h" #include "register.h" +*/ #include "vmpa.h" +/* #include "instructions/module.h" #include "operands/module.h" +*/ #include "../helpers.h" @@ -77,8 +80,10 @@ bool add_arch_module(PyObject *super) result = (module != NULL); + /* if (result) result = add_arch_instructions_module(module); if (result) result = add_arch_operands_module(module); + */ return result; @@ -103,17 +108,21 @@ bool populate_arch_module(void) result = true; + /* if (result) result = ensure_python_proc_context_is_registered(); if (result) result = ensure_python_instr_iterator_is_registered(); if (result) result = ensure_python_arch_instruction_is_registered(); if (result) result = ensure_python_arch_operand_is_registered(); if (result) result = ensure_python_arch_processor_is_registered(); if (result) result = ensure_python_arch_register_is_registered(); + */ if (result) result = ensure_python_vmpa_is_registered(); if (result) result = ensure_python_mrange_is_registered(); + /* if (result) result = populate_arch_instructions_module(); if (result) result = populate_arch_operands_module(); + */ assert(result); |