INTERNAL implies FORCE and therefore rewrites user's variables. These variables were not meant to be changed by the user, but in some cases, if the users knows what they are doing, they could do so.
* retdec::io: new logging interface
Provides new logging interface that is ment to unify output that
is produced in each part of RetDec decompiler.
The interface is designed to provide eazy management
of logging into files/tty.
Currently each module od decompiler manages logging on its own.
This is not sustainable state as change to logging interface
is rather difficult.
* Use retdec::io interface for logging
* Get rid of llvm-support module
This module is now obsolete as all logging mechanisms
have been transferred to retdec::io module.
* Provide option [-s|--silent]
Provides new option [-s|--silent] for retdec-decompiler executable.
This option will force retdec not to output anything on stdout.
* retdec/config: provide option to specify Log/Error files
Provides way to specify Log/Error files to RetDec.
This is useful for RetDec plugins that might this way
control decompilation output.
* Create loggers from user configuration
* Fix validators error messages
Fixes bug provided by fbbff343.
* Change Log functions to return new object
Provides change to log interface. Before this commit
logging was done on global objects. Now the logging
should be made on temporary objects that are returned
from special functions.
The reason for this is for usage of colors on output.
When temporary object is destructed default color is
printed on required interface.
* Change namespace Log to class Log
This way we can avoid not intentional usage of the
Log interface.
All functions of Log are ment to be used like:
Log::info()
Log::debug()
Log::error()
* Provide missing doxygen
* Fix missing cassert header
Fixes dc5791724.
* Enable ANSI colors on Windows
Starting Windows aniversary update Windows terminals provide
supprot for ANSI colors. This, however, needs to be enabled
manually.
More about this can be found here:
https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences?redirectedfrom=MSDN
* utils/io/logger: don't print colors to not supported terminals
* Use macro OS_WINDOWS instead of __has_include
Provides substitution of __has_include macro to OS_WINDOWS defined
in utils/os.h. The reason for this is to maintain a level of
consistency in RetDec source code base.
* Add a CHANGELOG entry for #791
Add its source and header directly to its only user. This is uglier, but much simpler than dealing with targets, exports, installs, etc. This will never be used outside of utils library.
* llvmir-emul: do not include llvm/Support/PluginLoader.h
This must not be included in a library.
* bin2llvmirtool: simplify
* llvmir2hlltool: do not include llvm/Support/PluginLoader.h
It is not needed and it is dangerous because it contains "load" option which can be included only once.
* bin2llvmir/providers/config: use params output file to generate config
* config/parameters: add more params
* bin2llvmir: add config-generator pass
* retdec/retdec: add super ugly decompilation API
* stacofin: stricter signature filtering
This is still very shitty. A better solution would be using some metadata in signature files - not the current signature-file-path-based filtering.
* progress: all test from "integration.ack" work
* progress
* progress
* do not manually create passes in code, use just the pass list
* create LlvmIr2Hll pass in llvmir2hll lib
* progress
* add decompiler-config.json
* aggregate LLVM passes
* add -k option
* bin2llvmir/config: fix Config::empty()
* bin2llvmir/unreahable_funcs: use params to disable opt
* retdec-decompiler: add more command line options
* progress
* all regression tests pass
* src/configtool: remove, not needed anymore
* config: remove isFromIda flag
* config: remove unused exceptions
* configL fix exceptions
* config: remove frontend version entry
* config: remove some duplicate values
* config: refactor
* config: refactor
* bin2llvmir: fix#301, fix#750, proper removal of artificial undef functions
* deps/llvm: update ref to fix gcc 10 compilation error
* deps/llvm: enable exeptions and RTTI
* progress
* remove debug msgs
* tests/debugformat_tests: fix compilation
* replace retdec-decompiler.py with retdec-decompiler
* retdec-decompiler: return decompilation error code
* tests/bin2llvmir/unreachable_funcs: fix JSON configs
* progress
* llvmir2hll: remove code specific for Python output HLL
* llvmir2hll: fix JSON output generation
* progress
* progress
* progress
* remove bin2llvmirtool and llvmir2hlltool
* refactor
* tests/bin2llvmir/x87_fpu: fix compilation
* unpackertool: do not build unpaker plugins separatelly
* scripts: return retdec-fileinfo.py back, some reg tests need it
* bin2llvmir: fix doxygen warnings
* set CMAKE_POSITION_INDEPENDENT_CODE and propagate it to deps
* Win: macOS: link llvmir2hll to decompiler target
* bin2llvmir/lti: fix pat filtering on windows
* retdec-decompiler: increase windows stack size
Co-authored-by: Peter Kubov <peter.kubov@avast.com>
* capstone2llvmir/x86: Add support of x87 FISTPP instruction and unit tests of new supported instruction.
* capstone2llvmir/x86: Add support of x87 FCMOVEcc instructions and unit test of new supported instructions.
* capstone2llvmir/x86: Add support of x87 FPREM instructions and unit test of new supported instructions.
* capstone2llvmir/x86: Add tests for x87 FPREM instructions.
* capstone2llvmir/x86: Add support of x87 F2XM1, FYL2X, FYL2xP1 instructions and unit test of new supported instructions.
* capstone2llvmir/x86: Add support of x87 FFREE instructions and unit test of new supported instructions.
* capstone2llvmir/x86: Add support of x87 FNSTCW instructions and unit test of new supported instructions.
* bin2llvmir/optimizations/x87_fpu: Add test for x87 fpu analysis and fix register indexing bug.
* bin2llvmir/optimizations/x87_fpu: Fix test for x87 fpu analysis.
* capstone2llvmir/x86.cpp: remove extra new lines
* capstone2llvmir/x86_impl.h: remove extra newline & indent
* capstone2llvmir/x86: Fix indention of new tests + comments.
* bin2llvmir/optimizations/x87_fpu: Create tests for different calling conventions and different architectures of x86.
Tests for architectures x86-16, x86-32, x86-64.
Tests for calling conventions cdecl, pascal, fastcall, stdcall, thiscall.
* capstone2llvmir/x86: Unit tests and translation of all FPU capstone instruction to llvmir.
FBLD, FBSTP, FNCLEX, FLDCW, FLDENV, FRSTOR, FNSAVE, FNSTENV, FNSTCW, FXSAVE, FXSAVE64, FXRSTOR, FXRSTOR64, FPTAN, FPATAN, FSCALE, FXTRACT, FXAM.
* capstone2llvmir/x86: Fix bug in FXRSTOR unit etst.
* config: Include "watcom" calling convention.
* bin2llvmir/optimizations/x87_fpu: Tests for x87 FPU analyze.
Tests for calling conventions:
- x86-16: cdecl, pascal, fastcall, watcom, unknown
- x86-32: cdecl, stdcall, pascal, fastcall, thiscall, watcom, unknown
- x86-64
* bin2llvmir/optimizations/x87_fpu: Analyze of FPU stack for functions with floating point return value (definitions and calls).
Analyzed calling conventions:
- x86-16: cdecl, pascal, fastcall, watcom, unknown
- x86-32: cdecl, stdcall, pascal, fastcall, thiscall, watcom, unknown
- x86-64
* bin2llvmir/optimizations/x87_fpu: Tests for FPU register stack usage with branches and loops.
* bin2llvmir/optimizations/x87_fpu: Analyze of FPU stack for nested blocks (branches, loops).
* bin2llvmir/optimizations/x87_fpu: Fix nested blocks analyze tests.
* bin2llvmir/optimizations/x87_fpu: Implement linear equation solver of basic block TOP tracking. Include OpenCV lib.
* bin2llvmir/optimizations/x87_fpu: FPU TOP optimization implemented for simple and nested BasicBlocks, floating-point return values of functions.
TODO: Import OpenCV library to Cmake build. Implement special calling conventions for 32bit architecture.
* capstone2llvmir/x86: Add support of x87 FPREM instructions and unit test of new supported instructions.
* capstone2llvmir/x86: Add support of x87 FNSTCW instructions and unit test of new supported instructions.
* capstone2llvmir/x86_impl.h: remove extra newline & indent
* capstone2llvmir/x86: Fix bug in FXRSTOR unit etst.
* deps/eigen: Include third party library Eigen to cmake of project. Library is used to math computation with matricies for X86 FPU analyze optimization.
* bin2llvmir/optimization/x87_fpu: Rewrite optimization with new Eigen library. Use matrix implementation of SVD from eigen library.
* tests/bin2llvmir: Refactor CMakeLists.txt
* bin2llvmir/optimization/x87_fpu: Fix bux for X86-16bit calling convention. Optimization now validate value of FPU top at the end of every terminating block and detects unsupported states.
* bin2llvmir/optimizations/x87_fpu: Fix and improve FPU stack optimization testss
* bin2llvmir/optimizations/x87_fpu: Fix major bug of overdetermined linear equation solver and minor bugs of final llvm ir generating.
* capstone2llvmir/x86: Add support of x87 FPREM instructions and unit test of new supported instructions.
* capstone2llvmir/x86: Add support of x87 FNSTCW instructions and unit test of new supported instructions.
* bin2llvmir/optimizations/x87_fpu: Add test for x87 fpu analysis and fix register indexing bug.
* bin2llvmir/optimizations/x87_fpu: Fix test for x87 fpu analysis.
* capstone2llvmir/x86_impl.h: remove extra newline & indent
* bin2llvmir/optimizations/x87_fpu: Create tests for different calling conventions and different architectures of x86.
Tests for architectures x86-16, x86-32, x86-64.
Tests for calling conventions cdecl, pascal, fastcall, stdcall, thiscall.
* capstone2llvmir/x86: Fix bug in FXRSTOR unit etst.
* capstone2llvmir/x86: Add support of x87 FPREM instructions and unit test of new supported instructions.
* capstone2llvmir/x86_impl.h: remove extra newline & indent
* capstone2llvmir/x86: Fix bug in FXRSTOR unit etst.
* bin2llvmir/optimizations/x87_fpu: Tests for x87 FPU analyze.
Tests for calling conventions:
- x86-16: cdecl, pascal, fastcall, watcom, unknown
- x86-32: cdecl, stdcall, pascal, fastcall, thiscall, watcom, unknown
- x86-64
* bin2llvmir/optimizations/x87_fpu: Analyze of FPU stack for functions with floating point return value (definitions and calls).
Analyzed calling conventions:
- x86-16: cdecl, pascal, fastcall, watcom, unknown
- x86-32: cdecl, stdcall, pascal, fastcall, thiscall, watcom, unknown
- x86-64
* bin2llvmir/optimizations/x87_fpu: Tests for FPU register stack usage with branches and loops.
* bin2llvmir/optimizations/x87_fpu: Analyze of FPU stack for nested blocks (branches, loops).
* bin2llvmir/optimizations/x87_fpu: Fix nested blocks analyze tests.
* bin2llvmir/optimizations/x87_fpu: Implement linear equation solver of basic block TOP tracking. Include OpenCV lib.
* bin2llvmir/optimizations/x87_fpu: FPU TOP optimization implemented for simple and nested BasicBlocks, floating-point return values of functions.
TODO: Import OpenCV library to Cmake build. Implement special calling conventions for 32bit architecture.
* deps/eigen: Include third party library Eigen to cmake of project. Library is used to math computation with matricies for X86 FPU analyze optimization.
* bin2llvmir/optimization/x87_fpu: Rewrite optimization with new Eigen library. Use matrix implementation of SVD from eigen library.
* tests/bin2llvmir: Refactor CMakeLists.txt
* bin2llvmir/optimization/x87_fpu: Fix bux for X86-16bit calling convention. Optimization now validate value of FPU top at the end of every terminating block and detects unsupported states.
* bin2llvmir/optimizations/x87_fpu: Fix and improve FPU stack optimization testss
* bin2llvmir/optimizations/x87_fpu: Fix major bug of overdetermined linear equation solver and minor bugs of final llvm ir generating.
* capstone2llvmir/x86: Add support of x87 FPREM instructions and unit test of new supported instructions.
* capstone2llvmir/x86: Add support of x87 FNSTCW instructions and unit test of new supported instructions.
* bin2llvmir/optimizations/x87_fpu: Add test for x87 fpu analysis and fix register indexing bug.
* bin2llvmir/optimizations/x87_fpu: Fix test for x87 fpu analysis.
* capstone2llvmir/x86_impl.h: remove extra newline & indent
* bin2llvmir/optimizations/x87_fpu: Create tests for different calling conventions and different architectures of x86.
Tests for architectures x86-16, x86-32, x86-64.
Tests for calling conventions cdecl, pascal, fastcall, stdcall, thiscall.
* capstone2llvmir/x86: Fix bug in FXRSTOR unit etst.
* capstone2llvmir/x86: Add support of x87 FPREM instructions and unit test of new supported instructions.
* bin2llvmir/optimizations/x87_fpu: Tests for x87 FPU analyze.
Tests for calling conventions:
- x86-16: cdecl, pascal, fastcall, watcom, unknown
- x86-32: cdecl, stdcall, pascal, fastcall, thiscall, watcom, unknown
- x86-64
* bin2llvmir/optimizations/x87_fpu: Analyze of FPU stack for functions with floating point return value (definitions and calls).
Analyzed calling conventions:
- x86-16: cdecl, pascal, fastcall, watcom, unknown
- x86-32: cdecl, stdcall, pascal, fastcall, thiscall, watcom, unknown
- x86-64
* bin2llvmir/optimizations/x87_fpu: Tests for FPU register stack usage with branches and loops.
* bin2llvmir/optimizations/x87_fpu: Analyze of FPU stack for nested blocks (branches, loops).
* bin2llvmir/optimizations/x87_fpu: Fix nested blocks analyze tests.
* bin2llvmir/optimizations/x87_fpu: Implement linear equation solver of basic block TOP tracking. Include OpenCV lib.
* bin2llvmir/optimizations/x87_fpu: FPU TOP optimization implemented for simple and nested BasicBlocks, floating-point return values of functions.
TODO: Import OpenCV library to Cmake build. Implement special calling conventions for 32bit architecture.
* capstone2llvmir/x86: Add support of x87 FPREM instructions and unit test of new supported instructions.
* capstone2llvmir/x86_impl.h: remove extra newline & indent
* capstone2llvmir/x86: Fix bug in FXRSTOR unit etst.
* deps/eigen: Include third party library Eigen to cmake of project. Library is used to math computation with matricies for X86 FPU analyze optimization.
* bin2llvmir/optimization/x87_fpu: Rewrite optimization with new Eigen library. Use matrix implementation of SVD from eigen library.
* tests/bin2llvmir: Refactor CMakeLists.txt
* bin2llvmir/optimization/x87_fpu: Fix bux for X86-16bit calling convention. Optimization now validate value of FPU top at the end of every terminating block and detects unsupported states.
* bin2llvmir/optimizations/x87_fpu: Fix and improve FPU stack optimization testss
* bin2llvmir/optimizations/x87_fpu: Fix major bug of overdetermined linear equation solver and minor bugs of final llvm ir generating.
* capstone2llvmir/x86_impl.h: remove extra newline & indent
* bin2llvmir/optimizations/x87_fpu: Create tests for different calling conventions and different architectures of x86.
Tests for architectures x86-16, x86-32, x86-64.
Tests for calling conventions cdecl, pascal, fastcall, stdcall, thiscall.
* capstone2llvmir/x86: Add support of x87 FPREM instructions and unit test of new supported instructions.
* capstone2llvmir/x86_impl.h: remove extra newline & indent
* bin2llvmir/optimization/x87_fpu: Fix bux for X86-16bit calling convention. Optimization now validate value of FPU top at the end of every terminating block and detects unsupported states.
* bin2llvmir/optimizations/x87_fpu: Fix and improve FPU stack optimization testss
* src/capstone2llvmir/x86: Fix and remove duplicities caused by my incorrect merge commit
* src/bin2llvmir/x87_fpu: Fix bug - remove forgotten declaration.
* src/bin2llvmir/x87_fpu: Fix bug - make analyze more accurate: fix some bugs when TOP is changed but not stored etc.
* tests/bin2llvmir/optimizations/x87_fpu: Rewrite actual and include new tests - fix bugs revealed by integration tests analyze.
* src/bin2llvmir/optimizations/x87_fpu: Fix bugs revealed by integration testing and improve performance of this optimization.
* src/capstoce2llvmir/x86: Fix merge conflict.
* deps/eigen: Remove Eigen library from deps and moves it into external libs.
* tests/bin2llvmir/optimizations/x87_fpu: Remove tests to 16bit architecture because this feature has depreaced due to unacceptable performance lack.
* src/bin2llvmir/optimizations/x87_fpu: Improve and optimize performance of algorithm. Replace SVD decomposition for QR decomosition due to performance increase. Fix includes for eigen library that is now external project. Optimize matrix rank calculation.
* bin2llvmir/optimization/x87_fpu: Set max performance ceil.
* Add External Eigen to cmake/deps.
* deps/eigen: Update CMake build.
* deps/eigen: Update CMake build.
* bin2llvmir/x87_fpu: Update analyze and tests -> remove FPU TAGS because RetDec do not use them anymore.
* deps/eigen: Fix eigen INTERFACE_INCLUDE_DIRECTORIES which was prefixed in the build directory.
Co-authored-by: Peter Matula <peter.matula@avast.com>
* yara: update to v4.0.1, fix#758, fix#283.
Yaracpp needed some work, because YARA interface changed. Also, I simplified and refactored Yaracpp a bit.
* yara_patterns/tools/pe/x86/packers: modify eziriz_dotnet_reactor_62_or_newer rule
Looks like the new YARA 4.0.1 ends dotnet user strings only with "\x00" instead of "\x00\x00" as before.
* yaracpp: fix doxygen comment
* yaracpp: fix doxygen warning
* deps/yara: better (more general) patching
* something working
* progress
* progress
* progress
* cmake: fix common and add ctypes
* src/serdes: new build system
* new build system for pdbparser
* new build system for yaracpp
* new build system for crypto component
* new build system for config
* refactor cmake for retdec-configtool
* new build system for idr2pat
* new build system for ar-extractor and its LLVM dependency
* refactor the new build system
* new build for ar-extractortool
* new build system for macho-extractor and macho-extractortool
* new build for ctypesparser, demangler, and demanglertool
* new build for llvm-support and llvmir-emul
* new build for capstone2llvmir and capstone2llvmirtool
* new build for fileformat, loader, cpdetect, fileinfo
* new build for most remaining modules
* cmake/options.cmake: fix debugformat enable settings
* some build system fixes
* cmake/options.cmake: make RETDEC_ENABLE_ALL into option
this allows us to set it to ODD and build only documentation
* tests: new build system for unit tests
* pelib: fix doxygen comment
* retdec/retdec: remove unused include of llvm-support/diagnostics.h
* fileformat: do not include openssl in headers
* cmake: make install paths relative.
When they are absolute, then all the paths in instaled cmake scripts are absolute - install dir could not be moved.
* deps/yara: refactor cmake to properly install libs
* deps/yara: small cosmetic changes
* deps/llvm: refactor cmake to properly install libs
* deps/capstone: refactor cmake to properly install libs
* deps: refactor cmake files
* deps: refactor cmake files
* deps/yaramod: refactor cmake to properly install libs
* CMakeLists.txt: fix files installation
* config/retdec-config-config.cmake: fix required component order
Looks like this may matter (on some machines or cmake version).
* deps/llvm: fix include installation
* fileformat/cmake: do not use openssl-crypto
For some reasons, this can cause linking problems on some machines.
* deps/yaramod: fix link library order
* deps/googletests: fix target link library order
* rtti-finder: make deps PUBLIC.
I have no idea why it doesn't work with PRIVATE.
* deps/yaramod: fix formatting
* cmake: more refactorization...
1. Protect against including the same target file multiple times. It looks like this was not a problem, but who knows.
2. Use find_package() instead of find_dependency(). It looks like the later does not work correctly for components on some CMake versions.
* cmake: do not create version files for all components
Only the main RetDec version file is needed.
* cmake: propagate current project version to package config files
It is used to find the same version retdec components.
* CMakeLists.txt: replace AnyNewerVersion -> ExactVersion in compatibility settings
Since we probably will make breaking changes, make retdec installation compatible only with the same version.
* cmake: remove all COMPONENT options, these are not really needed
* cmake: move dependency finders inside double target protection conditions
* cmake: prefix all deps targets with retdec::deps::
* fileinfo: add openssl-crypto dep
* Revert "fileinfo: add openssl-crypto dep"
This reverts commit e1645d7fd5e81d1606c96752da3ac633c38a63e1.
* remove RETDEC_FORCE_OPENSSL_BUILD option, always build OpenSSL
* cmake: refactorization
* deps/whereami: fix include paths
* deps/tinyxml+whereami: fix included dirs
* deps/yaramod: fix pog_fmt lib installation
* deps/whereami: properly install target, not as part of utils.
Previous version should work, but there is a CMake bug in older versions which screws it up on Windows and macOS.
* crypto: link retdec::deps::openssl-crypto as PUBLIC
* bin2llvmir/providers/debugformat: fix segfault
Co-authored-by: Peter Matula <imatula@fit.vutbr.cz>
They cannot be changed by the user, and the FORCE is implied - i.e. their value in cache is set even if they are already in cache -> value change in the file will affect build.
We had both of these JSON libs as deps. Since it is critical to parse LTI files as fast as possible, we need rapidjson. Therefore, in order to minimize RetDec deps, we completely replace jsoncpp with rapidjson.
* cmake/install-share.py: update reference to a new support package.
* support: add signsrch signatures and ordinals.
* support: refactoring.
* support: more refactoring.
* support: add a new yara compilation script.
* support: implement the new YRA compilation script.
* support/yara_patterns/tools/macho: make rule names unique.
* support: refactor YARA rules management.
* Revert "support/yara_patterns/tools/macho: make rule names unique."
This reverts commit 3dee41c6b526bfee7fc3054190f20d0fec2778c3.
* deps/yaracpp: allow usage of a local YaraCpp directory.
* cpdetect/compiler_detector: use namespaces for YARA rules.
This prevents YARA errors caused by YARA rule ID conflicts.
* travis+appveyor: no not compile YARA rules in CI services.
* CMakeLists.txt: do not compile YARA rules by default.
This is just to check this option in TeamCity service. This commit will
be reverted later.
* Revert "CMakeLists.txt: do not compile YARA rules by default."
This reverts commit 260c9319b4ec2fa8443dafd383cc5704053b5d1d.
* CHANGELOG.md: https://github.com/avast-tl/retdec-support/issues/3 entry
Fix https://github.com/avast-tl/retdec-support/issues/3
* Convert most Bash scripts to Python
* Port cmake/install-share to python
* Some cleanup
* Replaced install-share in cmake file with fully working python version
* Attemp to fix compile error
* Fix compile for older python version
* Try calling python 3 instead
* Make install-share.py executable
Compilable decompiler version
* Decompiler script now runs successfully until unpacking
* Running until calling bin2llvmir now
* [skip ci] Integrate @silverbacknet changes + some fixes
* [skip ci] Use CmdRunner.run_cmd everywhere in retdec_decompiler
Small fixes and cleanup
Early out if an error occurs
* [skip ci] Latest fixes
add retdec_tests_runner.py
* [skip ci] Check that options are correct + cleanup and fixes
* [skip ci] Fixed various errors
* Try to fix running install-share script
* Should now work on every os
* Fix compile error
* Convert compile-yara to python
* [skip ci] Make test runner more portable
* [skip ci] Use correct code style
* [skip ci] Decompiler script now runs successfully
* Now generates the same output as the bash script
* Try fixing Travis on macOS
* Upgrade python instead
* Test scripts in travis
* Fix build
* Fix path
* Update build
Small cleanup
* Fix error in decompiler script
* Try to debug failure reason
Fix test runner
Use Python 3.5 on ubuntu
* Use newer Python version and fix some errors
* [skip ci] Little cleanup to make the code more clear
Don't parse_args twice
* [skip ci] First version of reimplementing logging
* [skip ci] Some fixes and cleanup
* [skip ci] Print memory usage, print output from unpacker, match code convention and some other fixes
* [skip ci] Fix crash when using cleanup option; fix crash when using color ida
* [skip ci] Fix --backend-aggressive-opts argument
* [skip ci] Fix error when file arch is followed by a comment
* [skip ci] Match Bash script more closely
* [skip ci] Fix a few comments
* [skip ci] Add some comments
* [skip ci] Add early type_extractor/gen_cstdlib_and_linux_jsons.py and type_extractor/gen_windows_and_windrivers_jsons.py version
* Try Unit tests
* Try to fix test
* Use absolute path instead
* [skip ci] Add check for python scripts
* scripts/retdec_decompiler.py: use output if specified via -o option