DeThunk
This is the header file preprocessor. The header files are generated by HeaderGen (LiteLDev's non-public software). Some of the generated things may cause incorrect symbols or compilation failures. This tool is used to erase them.
Exclusion List
It is generally considered that excluding something is a desperate measure, so there are plans to completely rewrite DeThunk.
Tip
An exclusion list is maintained based on the branch name of the header files and can be obtained from here.
The exclusion list is mainly for "types", and the reasons for exclusion are varied. In short, the exclusion list serves "passing compilation".
Presets
We provide preset rules for general use, and generally prefer to use presets instead of detailed options.
Preset | Equal to... |
---|---|
--preset-extract-names |
--remove-constructor-thunk --remove-destructor-thunk --remove-virtual-function-thunk --remove-virtual-table-pointer-thunk --restore-static-variable |
--preset-extract-types |
--preset-extract-names --restore-member-variable |
Usage
usage: dethunk [-h] --exclusion-list EXCLUSION_LIST [--remove-constructor-thunk] [--remove-destructor-thunk]
[--remove-virtual-table-pointer-thunk] [--remove-virtual-function-thunk] [--restore-static-variable]
[--restore-member-variable] [--all] [--preset-extract-names] [--preset-extract-types]
path
positional arguments:
path Path to header project.
options:
-h, --help show this help message and exit
--exclusion-list EXCLUSION_LIST
Configure ignore rules.
--remove-constructor-thunk
--remove-destructor-thunk
--remove-virtual-table-pointer-thunk
--remove-virtual-function-thunk
--restore-static-variable
--restore-member-variable
--all Apply all remove/restore options.
--preset-extract-names
--preset-extract-types
Warning
The modification will be done directly on the original file.
Example
python main.py --all --exclusion-list exclusion_list/r21_u6.toml path/to/header