Commit Graph

27 Commits

Author SHA1 Message Date
Peter Matula
e72f74eb06
utils: replace our filesystem_path with std::filesystem (#806)
* utils: replace our filesystem_path with std::filesystem

* .travis.yml: update xcode11 -> xcode12

* README: bump macOS to 10.15, add note about filesystem lib on GCC 7

* fix windows-specific use of filesystem library

* travis.yml: try to use xcode 11.4 instead of 12, ccache doesn't work in 12

* .travis.yml: remove macOS build.

After xcode update, ccache either dows not work, or it does not help enough to finish the build in time limit. I.e. macOS build always timeouts and therefore we cannot use it.
2020-07-17 14:55:22 +02:00
Peter Matula
5281b06dc8
Retdec is a library now (#779)
* 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>
2020-06-05 07:42:46 +02:00
Matula Peter
78974d3f00 .travis.yml: build test program for x64, not x86 architecture.
The compiler on the new macOS does not support -m32 option.
2019-11-20 17:10:43 +01:00
Matula Peter
4e7baf2592 .travis.yml: install openssl 1.1. for macOS.
This should speed-up the build.
2019-11-20 15:16:21 +01:00
Matula Peter
1b36589a42 .travis.yml: do not build RetDec unit tests for macOS.
macOS with xcode 11.2 is no longer as fast as it was before - we need to speed-up the build.
This will also make the tests for macOS the same as for Linux.
2019-11-20 15:12:39 +01:00
Peter Matula
dcca9bee47
New yaramod (#680)
* deps/yaramod: update to version v3.0.0b0

* Remove all mentions of flex and bison.

We don't need them anymore. The new yaramod does not use them.

* deps/yaramod: do not require Flex and Bison.

* deps/yaramod: fix paths in target_link_libraries()

* CHANGELOG.md: add entry for Yaramod update - PR #680.
2019-11-20 15:06:25 +01:00
Peter Matula
d2d29abf4e
Fix issue #650 (#679)
* CMakeLists.txt: bump C++ standard from 14 to 17

* .travis.yml: bump xcode from 8.3 to 11.2

* .appveyor.yml: bump Visual Studio from 2015 to 2017

* README.md: bump various versions related to #650

* CHANGELOG.md: fix #650, add entry for #650.

* deps/llvm: do not use LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN

This was necessary only for builds on older MS Visual Studios (e.g. 2015).
These are no longer supported by RetDec - Visual Studio 2017 is minimum.

* appveyor+travis: temporarily enable builds of this branch

* src: remove use of std::ptr_fun and std::not1.

These were either deprecated or removed in C++17.

* .travis.yml: do not upgrade python3

It is already installed and upgraded in the used xcode 11.2.

* depspelib: update reference to the c++17 PeLib version.

* deps/pelib: update reference to the latest commit in c++17

* deps/pelib: update reference to the latest c++178 fix

* deps/yaramod: update reference to v2.12.0

* deps/variant: replace with std::variant and remove

* deps/pelib: update reference to the latest master

* deps/yaramod: update reference to v2.12.1

* replace Maybe implementations with C++17 std::optional

* utils/filesystem_path: remove utils/value include

* add missing <optional> includes

* tests/capstone2llvmir: replace deprecated macros with new ones

replace INSTANTIATE_TEST_CASE_P with INSTANTIATE_TEST_SUITE_P

* tests/llvmir2hll: fix "assign to itself" warnings

* llvmir2hll/graphs: replace deprecated use of std::iterator

* .travis.yml: move from Ubuntu Xenial to Bionic

* deps/rapidjson: define RAPIDJSON_NOMEMBERITERATORCLASS
2019-11-19 17:59:02 +01:00
Petr Zemek
3832eb1fab travis.yml: Fix syntax of the file to make it valid YAML.
The bug was introduced in commit 1bda328716.
2019-05-30 13:59:22 +02:00
Peter Matula
1bda328716
travis.yml: build and run unit tests only on macOS
Linux builds are often timeouting when unit tests are enabled.
2019-05-29 12:24:25 +02:00
Marek Milkovič
58494613b0 Revert "Try to build just llvm in travis right now"
This reverts commit 0ddbb6b3cd.
2019-05-03 20:45:48 +02:00
Marek Milkovič
0ddbb6b3cd Try to build just llvm in travis right now
Currently all our build in Travis CI time out so let's try to regenerate
the cache because it seems like it is corrupted since we upgraded to
Xenail.
2019-05-03 20:20:51 +02:00
Peter Matula
301f4e6470
Support refactoring (#518)
* 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 3dee41c6b5.

* 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 260c9319b4.

* CHANGELOG.md: https://github.com/avast-tl/retdec-support/issues/3 entry

Fix https://github.com/avast-tl/retdec-support/issues/3
2019-03-18 10:08:11 +01:00
Olaf Braun
9d2bf6628f Remove a recursive function call with a iterative function (#450)
* Update gitignore

* Remove file

* Update gitignore

* Use new capstone engine

* Remove the recursive function call with a iterative function

* Insert v flag fix

* Fix git ignore

* Fix topVal

* Supports the gnu time package from brew

* Update comment

* Update travis
2019-03-02 17:04:36 +01:00
Peter Matula
dcbbe6f092 .tavis.yml: revert macos version back to 8.3. 10.1 was timeouting. 2019-03-02 17:41:47 +01:00
Peter Matula
03d600987c .travis.yml: update distro from Trusty to Xenial, remove unneeded pkgs. 2019-02-28 14:46:14 +01:00
Petr Zemek
a385146fb4 Remove no-longer-needed dependency libtinfo/ncurses from README, Dockerfile, and .travis.yml.
We have removed it in #409.
2018-10-08 16:58:02 +02:00
Peter Matula
999a0c41dd travis+appveyor CIs: do not run for bash-to-python branch. 2018-08-13 14:47:39 +02:00
Peter Matula
7a8f32aec0 .travis/yml: remove some unneeded packages. 2018-07-27 14:59:27 +02:00
Peter Matula
2feeaaf718 .tarvis.yml: enable full travis script. 2018-07-20 14:36:25 +02:00
Peter Matula
10a73db2df .travis.yml: print python version after cmake configuration 2018-07-19 16:07:13 +02:00
Peter Matula
273de55dda .travis.yml: print python versions. 2018-07-19 15:47:29 +02:00
Peter Matula
d2111ccb01 update CI configs to use python scripts 2018-07-19 15:12:09 +02:00
Michael Kösel
4de4f4984d [WIP] Convert Bash scripts to Python #147 (#338)
* 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
2018-07-12 16:36:16 +02:00
Petr Zemek
d385fec4e0 Remove a redundant command from .travis.yml concerning 'readlink'.
The symlinking is no longer needed as our scripts now use 'greadlink' when
available.
2018-03-30 19:12:59 +02:00
Petr Zemek
1db0cb6379 Fix grammar in .appveyor.yml and .travis.yml files. 2018-02-06 06:32:48 +01:00
Peter Matula
4b0b7b7922 travis-ci: fix bash script execution on linux. 2018-01-26 18:20:50 +01:00
Peter Matula
62527970f3 add travis CI and appveyor CI configs 2018-01-26 16:09:07 +01:00