Commit Graph

2487 Commits

Author SHA1 Message Date
Giacomo Vercesi 7c3d9a3fcd Python API: automatically call destructors
Use the owning annotation in PipelineC/Prototypes.h to automatically
destroy resources when they go out of scope on the python side.
2022-05-24 08:59:08 +02:00
Massimo Fioravanti 1508a1bc72 revng-pipeline: support out of line analyses 2022-05-24 08:59:08 +02:00
Massimo Fioravanti e38dfc74cc PipelineC: introduce run_all_analyses 2022-05-24 08:59:08 +02:00
Massimo Fioravanti f0a5ffe3b3 revng-pipeline: globals, extractOne and analyses 2022-05-24 08:58:48 +02:00
Massimo Fioravanti 2c48713af9 Make TupleTreeDiff compatible with regular vectors 2022-05-24 08:50:24 +02:00
Giacomo Vercesi 07c23dda8d revng-deamon: fix GraphQL URL
The page was using the wrong attribute to make the GraphQL calls
relative to the debug page's url.
2022-05-24 08:49:16 +02:00
Alessandro Di Federico 5b39595b77 Minor changes 2022-05-13 15:14:51 +02:00
Alessandro Di Federico e89870d125 Merge branch 'feature/asan-support' 2022-05-13 07:59:49 +02:00
Alessandro Di Federico 22d469aa10 mv librevngUnitTestHelpers.{a,so} 2022-05-12 21:55:18 +02:00
Alessandro Di Federico 41c21ddb07 revng-daemon: use ASan 2022-05-12 21:55:18 +02:00
Alessandro Di Federico 34a94188f0 Suggest how to build with ASan 2022-05-12 21:55:18 +02:00
Alessandro Di Federico ccba62b13d revng opt: do not add --help 2022-05-12 21:54:42 +02:00
Alessandro Di Federico fdd6f3a5f8 Merge branch 'feature/pipeline-friendly-string-map' 2022-05-12 21:54:37 +02:00
Pietro Fezzardi 20fea32ce1 FunctionStringMap: improve code-reuse
The serialize() method now uses the serialize() function provided by
revng/Support/YAMLTraits.h, so we don't have to explictly const_cast.
2022-05-12 17:00:13 +02:00
Pietro Fezzardi 1bb5bd6eee ModelGlobal: don't move the underlying model::Binary
Moving it was causing the address of the model to change, while for the
functionality of revng-pipeline we need it to be stable.

So we pay the price of expensive copy, for the sake of downstream
stability.
2022-05-12 16:59:47 +02:00
Pietro Fezzardi 741d55279b TupleTree: add copy-constructor and -assignment
The copy of a TupleTree is potentially very expensive, so it was
disabled until now and only allowed via the explict method clone().

We have now decided to make TupleTree copiable.
This commit adds a copy-constructor and a copy-assignment, killing the
clone() method that was already unused and is now effectively useless.
2022-05-11 16:16:49 +02:00
Pietro Fezzardi b190f1a47c Refactor logic to compact function targets
This commit introduces a reusable function to compact
pipeline::TargetLists that represent functions.

Initially this reasoning was only needed by TaggedFunctionKind, but now
also FunctionStringMap needs it, and potentially others in the future,
so it makes sense to keep only a single implementation for it instead of
duplicating code (and likely bugs).
2022-05-11 16:16:49 +02:00
Pietro Fezzardi ca566a76f0 Rename StringMapContainer to FunctionStringMap
This new naming more closely describes the fact that each element in the
map must be associated with a model::Function
2022-05-11 16:16:32 +02:00
Pietro Fezzardi bce0bd70b1 StringMapContainer: fix enumeration for * target 2022-05-11 14:52:22 +02:00
Pietro Fezzardi 2dea29d926 StringMapContainer: use multiline strings in YAML 2022-05-11 14:39:31 +02:00
Pietro Fezzardi 0f4df96ad6 Mark some dump() methods as debug_function 2022-05-11 14:39:31 +02:00
Pietro Fezzardi bfe67413d3 StringMapContainer: find() and contains() methods 2022-05-11 14:39:31 +02:00
Pietro Fezzardi 1c6dac225a Add dedicated non-generated TypeKind.h header
This is necessary because now QualifiedType.h needs TypeKind, but
including Type.h directly would result in a circular dependency between
Type.h and QualifiedType.h
2022-05-11 14:39:31 +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