LinuxSimProcedure
¤
LinuxSimProcedure
¤
LinuxSimProcedure(verbose=False)
Bases: CustomSimProcedure
Defines methods for customizing Linux simulation procedures.
This class includes methods for setting up the logger, handling alternative names, customizing hooks for static libraries, and loading the syscall table using the Linux loader.
This method sets up the Linux environment for simulation procedures by initializing the logger and configuring the environment for Linux-specific procedures.
Source code in sema_toolchain/sema_scdg/application/procedures/LinuxSimProcedure.py
33 34 35 36 37 38 39 40 41 |
|
amd64_sim_proc_hook
¤
amd64_sim_proc_hook(project, name, sim_proc)
Applies a simulation procedure hook for AMD64 architecture in the project.
This function hooks the specified name with the provided simulation procedure, applying the System V AMD64 calling convention if the project architecture is AMD64.
Source code in sema_toolchain/sema_scdg/application/procedures/LinuxSimProcedure.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
config_logger
¤
config_logger()
Configures the logger if it is not already set.
This function sets up the logger for the Linux simulation procedure, initializing it with the specified log level if it is not already defined.
Source code in sema_toolchain/sema_scdg/application/procedures/LinuxSimProcedure.py
43 44 45 46 47 48 49 50 51 |
|
custom_hook_linux_symbols
¤
custom_hook_linux_symbols(proj)
Customizes hooking for Linux symbols in the project.
This function applies custom procedures to symbols from the custom package, handling exceptions and standard procedures based on the symbol name.
Source code in sema_toolchain/sema_scdg/application/procedures/LinuxSimProcedure.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|
custom_hook_static
¤
custom_hook_static(proj)
Applies custom static hooks for Linux symbols in the project.
This function customizes hooking for specific Linux symbols, including handling different procedures based on the symbol name, architecture, and predefined simulation procedures.
Source code in sema_toolchain/sema_scdg/application/procedures/LinuxSimProcedure.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|
deal_with_alt_names
¤
deal_with_alt_names(pkg_name, proc)
Sets the value in the sim_proc dictionary for alternative names encountered.
This function iterates through the alternative names of a procedure and assigns the procedure to the corresponding package name in the sim_proc dictionary.
Source code in sema_toolchain/sema_scdg/application/procedures/LinuxSimProcedure.py
53 54 55 56 57 58 59 60 |
|
load_syscall_table
¤
load_syscall_table(proj)
Loads the syscall table using the Linux loader in the project.
This function initializes the system call table by loading it from the project using the Linux loader.
Source code in sema_toolchain/sema_scdg/application/procedures/LinuxSimProcedure.py
151 152 153 154 155 156 157 |
|