Module pychrysalide.core
Documentation
This module provides access to the Chrysalide core properties through the Python bindings.
Some of these features are singleton objects.
As attributes are not allowed for Python modules, all these property accesses are handled with methods.
Methods
get_all_processor_keys()
Provide the list of keys from all registered architecture processors.
get_content_explorer()
Get the global exploration manager discovering contents.
The returned object is a ContentExplorer
instance used as singleton.
get_content_resolver()
Get the global resolution manager translating binary contents into loaded contents.
The returned object is a ContentResolver
instance used as singleton.
get_current_project()
Get the current global project.
The returned object is an instance of type StudyProject
.
get_demangler_for_key(key)
Create a new demangler for a given type of encoding, provided as a key string.
The return instance is a CompDemangler
subclass.
get_main_configuration()
Give access to the main configuration of Chrysalide.
The returned object is an instance of type GenConfig
.
get_processor_for_key(key)
Provide an instance of an architecture processor for a given name, provided as a key string.
The return instance is a ArchProcessor
subclass.
get_rost_root_namespace()
Get the root namespace for ROST.
The returned object is a ScanNamespace
instance used as singleton; it should not be None
.
get_verbosity()
Get the log verbosity, as a LogMessageType
level.
A COUNT
value means no log gets displayed, a null value means all kinds of logs get printed.
is_batch_mode()
Tell if Chrysalide is started in batch mode or with a GUI.
log_message(type, msg)
Display a message in the log window, in graphical mode, or in the console output if none.
The type of the message has to be a LogMessageType
value.
register_processor(inst)
Register an architecture processor using an initial instance of it.
This instance has to be a subclass of ArchProcessor
.
set_current_project(project)
Set the current global project.
The provided project has to be an instance (or a subclass) of StudyProject
.
set_verbosity(level)
Set the log verbosity. The provided level has to be castable into a LogMessageType
value.
A COUNT
value means no log gets displayed, a null value means all kinds of logs get printed.
setup_global_work_group()
Create a new work group for parallel processed jobs.
The quantity of threads allocated for processing future data depends of available CPU cores.
The returned value is an integer value referring to the unique identifier of a work group.
setup_tiny_global_work_group(count=1)
Create a new tiny work group for parallel processed jobs.
The count
argument defines the quantity of threads allocated for processing future data.
The returned value is an integer value referring to the unique identifier of a work group.
wait_for_all_global_works()
Wait for all global tasks being processed.
Constants
LogMessageType
Available types for log messages.
0 | = 0 |
1 | = 1 |
2 | = 2 |
3 | = 3 |
4 | = 4 |
5 | = 5 |
6 | = 6 |
MainParameterKeys
Keys referring to main configuration parameters.
FORMAT_NO_NAME | = "format.symbols.use_phy_instead_of_virt" |
INTERNAL_THEME | = "gui.editor.theme" |
TITLE_BAR | = "gui.editor.hide_titlebar" |
LAST_PROJECT | = "gui.editor.last_project" |
SKIP_EXIT_MSG | = "gui.editor.skip_exit_msg" |
MAXIMIZED | = "gui.editor.start_maximized" |
ELLIPSIS_HEADER | = "gui.editor.panels.ellipsis_header" |
ELLIPSIS_TAB | = "gui.editor.panels.ellipsis_tab" |
WELCOME_STARTUP | = "gui.editor.panels.welcome.show_at_startup" |
WELCOME_CHECK | = "gui.editor.panels.welcome.check_version" |
LABEL_OFFSET | = "gui.editor.views.label_offset" |
HEX_PADDING | = "gui.editor.views.hex_padding" |
SELECTION_LINE | = "gui.editor.views.selection_line" |
TOOLTIP_MAX_CALLS | = "gui.editor.views.tooltip_max_calls" |
TOOLTIP_MAX_STRINGS | = "gui.editor.views.tooltip_max_strings" |
HEX_UPPER_CASE | = "gui.editor.views.hex.upper_case" |
LINK_DEFAULT | = "gui.editor.graph.link.default" |
LINK_BRANCH_TRUE | = "gui.editor.graph.link.branch_true" |
LINK_BRANCH_FALSE | = "gui.editor.graph.link.branch_false" |
LINK_LOOP | = "gui.editor.graph.link.loop" |
KEYBINDINGS_EDIT | = "gui.key_bindings.global.edit" |
TMPDIR | = "misc.tmpdir" |
AUTO_SAVE | = "project.autosave" |