diff options
Diffstat (limited to 'src/core/core.c')
-rw-r--r-- | src/core/core.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/core/core.c b/src/core/core.c index 8fe12f5..c730fad 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -25,6 +25,7 @@ #include "global.h" +#include "processors.h" @@ -61,6 +62,14 @@ bool load_core_components(AvailableCoreComponent flags) } + if ((flags & ACC_CODE_ANALYSIS) != 0 && (__loaded & ACC_CODE_ANALYSIS) == 0) + { + register_arch_gtypes(); + + init_operands_factory(); + + } + return result; } @@ -80,6 +89,12 @@ bool load_core_components(AvailableCoreComponent flags) void unload_core_components(AvailableCoreComponent flags) { + if ((flags & ACC_CODE_ANALYSIS) != 0 && (__loaded & ACC_CODE_ANALYSIS) == 0) + { + exit_operands_factory(); + + } + if ((flags & ACC_GLOBAL_VARS) != 0 && (__loaded & ACC_GLOBAL_VARS) == 0) { set_work_queue(NULL); @@ -111,7 +126,6 @@ void unload_core_components(AvailableCoreComponent flags) #include "demanglers.h" #include "global.h" #include "params.h" -#include "processors.h" #include "queue.h" #include "../analysis/scan/core.h" #ifdef INCLUDE_MAGIC_SUPPORT @@ -195,9 +209,6 @@ bool load_all_core_components(bool cs) if (result) result = init_segment_content_hash_table(); - register_arch_gtypes(); - init_operands_factory(); - } } @@ -223,8 +234,6 @@ void unload_all_core_components(bool cs) { if (cs) { - exit_operands_factory(); - exit_segment_content_hash_table(); unload_demanglers_definitions(); |