Commit Graph

6113 Commits

Author SHA1 Message Date
Pietro Fezzardi 238b98c3da Switch all revng-c to revng-pipeline 2022-05-11 12:42:38 +02:00
Pietro Fezzardi f8c512f0b8 Drop LLVM passes from lib/HeadersGeneration
Now the emission of C headers for decompilation is entirely handled
through the new revng-pipeline infrastructure and/or via standalone
tools.
2022-05-11 12:42:38 +02:00
Pietro Fezzardi 96148248b1 Drop old unused flag: -dla-flatc-dir 2022-05-11 12:42:38 +02:00
Pietro Fezzardi c88504afbf Drop old flag -single-decompilation
This flag was used with the old C backend to decompile only a single
function from a binary.

The logic of selecting functions in a binary for decompilation is now
part of revng-pipeline, so the -single-decompilation option and the
associated TargetFunctionOption library can be dropped.
2022-05-11 12:42:38 +02:00
Pietro Fezzardi 5071fe8dc4 Add CDecompilationPipe 2022-05-11 12:42:38 +02:00
Pietro Fezzardi 576f6b23aa Add IRCanonicalization pipeline yaml file 2022-05-11 12:42:38 +02:00
Pietro Fezzardi 56de892efb Add HelpersToHeaderPipe 2022-05-11 12:42:38 +02:00
Pietro Fezzardi 7e926db200 Add ModelToHeaderPipe 2022-05-11 12:36:32 +02:00
Alessandro Di Federico 7ea6a88ffd Merge branch 'feature/revng-check-conventions-improvements' 2022-05-11 09:29:55 +02:00
Pietro Fezzardi a17a456479 revng-check-conventions: fix clang-format errors
Before this commit, clang-format somw clang format errors were
discarded.
This commit fixes the problems, in two ways:
- passes -Werror to clang-format, to make it stricter when reporting
  errors
- drops a wrong || true when `--force-format` is passed resulting in bad
  error codes
2022-05-11 09:29:45 +02:00
Pietro Fezzardi 17b4129350 revng-check-conventions: better detect SCRIPT_PATH
The new detection mechanism works across symlinks, while the previous
did not.
2022-05-11 09:29:45 +02:00
Alessandro Di Federico 450b0b4013 Minor changes 2022-05-11 09:29:45 +02:00
Alessandro Di Federico 581b468b58 Merge branch 'feature/typescript-generator' 2022-05-09 13:39:37 +02:00
Giacomo Vercesi efcc636483 Introduce roundtrip tests for TypeScript 2022-05-09 13:38:51 +02:00
Giacomo Vercesi 4219f236cf Generate model.ts.tgz installable package 2022-05-09 13:38:42 +02:00
Giacomo Vercesi 24c51f385a CMake: generate model.ts 2022-05-09 13:37:58 +02:00
Giacomo Vercesi a4ca82b50b Introduce TypeScript model generator 2022-05-09 13:37:35 +02:00
Giacomo Vercesi 4468cedbf1 CMake: generate node_modules 2022-05-09 13:37:03 +02:00
Giacomo Vercesi a98a7bb5d5 tuple_tree_generator: python_type -> type_info
This is part of an effort to generalize our current generator to make it
easier to support multiple backends.
2022-05-09 13:35:59 +02:00
Giacomo Vercesi 8a61d7c2b9 Model/ABI.h: make doc fields multiline 2022-05-09 13:35:10 +02:00
Giacomo Vercesi b3535d8092 revng-check-conventions: isort improvements
* Make isort ignore default `src_paths`
* Improve sorting rules in case of missing modules
2022-05-09 13:33:46 +02:00
Giacomo Vercesi 316e5f1ff7 revng-check-conventions: refactor run_revng_checks
Split `run_revng_checks` into C/C++ specific tests and general tests.
2022-05-09 13:33:18 +02:00
Alessandro Di Federico 422d5d88e4 Minor changes
Apply fixes due to `isort` misconfiguration.
2022-05-09 13:32:07 +02:00
Alessandro Di Federico 0d447f09d4 Merge branch 'feature/add-assembly-markup-pipeline' 2022-05-06 20:30:45 +02:00
Ivan Krysak 6a50787dd4 Add runtime html assembly output tests 2022-05-06 18:51:47 +02:00
Ivan Krysak 282b4e238d Add yield-assembly pipeline 2022-05-06 18:51:47 +02:00
Ivan Krysak 8a07e67767 Add revng yield assembly tool 2022-05-06 18:51:47 +02:00
Ivan Krysak cf3845b78d Add a way to output assembly as plain text 2022-05-06 18:51:47 +02:00
Ivan Krysak 1adc74e660 Import an assembly to html converter from caliban 2022-05-06 18:51:47 +02:00
Ivan Krysak 6e81dbe06c Add a disassembly helper 2022-05-06 18:51:47 +02:00
Ivan Krysak 36c63c1bb9 Implement the disassembler interface 2022-05-06 18:51:47 +02:00
Ivan Krysak 6125ad4a71 Define internal assembly representation 2022-05-06 18:51:47 +02:00
Ivan Krysak cfc9915b39 Add ModelInModule::getModule. 2022-05-06 18:51:47 +02:00
Ivan Krysak 42c1461b9f Add MetaAddressType::getLLVMCPUFeatures 2022-05-06 18:51:47 +02:00
Ivan Krysak 20ccb79dd1 Add constant module tag-based filters 2022-05-06 18:51:47 +02:00
Ivan Krysak 4737efd763 Add a non-pass binary loader 2022-05-06 18:51:47 +02:00
Ivan Krysak 6ba8010507 Add a missing include 2022-05-06 18:51:47 +02:00
Ivan Krysak 2a6a7943f4 Fix a couple of minor typos 2022-05-06 18:51:47 +02:00
Alessandro Di Federico 3b7fc401d5 Merge branch 'feature/fix-block-end' 2022-05-06 16:04:34 +02:00
Alessandro Di Federico aa07b96d61 EFA: fix Block.End in ground truth 2022-05-06 16:04:23 +02:00
Alessandro Di Federico 1764f6120c EFA: update Block.End when appropriate
This change handles the situation in which getLastPC returns an invalid
MetaAddress. This is a new behavior introduces to handle queries on
`llvm::BasicBlock`s whose last PC is ambiguous.
2022-05-06 16:04:22 +02:00
Alessandro Di Federico 9fcdc3393a getLastNewPC: return nullptr when ambiguous 2022-05-06 16:04:22 +02:00
Alessandro Di Federico f42fd7f801 Merge branch 'feature/new-graphql-server' 2022-05-06 15:28:45 +02:00
Giacomo Vercesi 09d9950aac daemon: fix debug page in subpaths 2022-05-06 15:04:19 +02:00
Giacomo Vercesi d13e802c4f daemon: Disable debug page in production mode 2022-05-06 15:04:19 +02:00
Giacomo Vercesi 3bdf8468b1 Add extra command line options to 'revng daemon'
--production runs the server on all interfaces and with debug options
disabled
--hypercorn-args allows to pass extra options to hypercorn when running
revng daemon
2022-05-06 15:04:19 +02:00
Giacomo Vercesi 70f7337f28 Substitute Flask with Starlette
In the future we will need to use GraphQL subscriptions. This is done
via websockets and is supported in Ariadne. However this support is
limited to ASGI frameworks, which Flask isn't a part of.
Startlette is a direct depencency of Ariadne, and all of Ariadne's
features are fully integrated with Starlette, so the switch allows to
drop some Flask integration cruft and streamline the revng.daemon
package.
Starlette does not have a built-in development server, instead
Hypercorn, which is an ASGI-compliant HTTP server, is used in place of
Flask's Werkzeug/Gunicorn for both the development and production
server roles.
2022-05-06 15:04:19 +02:00
Giacomo Vercesi 2a89da8d53 revng daemon: properly shut down after tests
Fix termination of the daemon process during test, previously it was the
daemon instances were not cleaned up properly and remained running after
the tests
2022-05-06 15:03:51 +02:00
Giacomo Vercesi f02976faee revng --help: do not display absolute paths 2022-05-06 15:03:35 +02:00
Pietro Fezzardi a4dae8c903 Add LoadGHASTWrapperPass 2022-05-05 14:53:30 +02:00