This also changes the names that show up in the VSCode-based UI, so that
they are coherent with what's included in the decompiled C code via the
related #include directives.
Its presence lead to an undesirable situation where the file itself
would get copied to the install directory and using `add_subdirectory`
led to creating a set of support files (which would get installed too).
Simple solution: just push the content of that file in the root
`CMakeLists.txt`.
- Add PrepareLLVMIRForMLIR Pass.
This Pass performs massaging of the LLVM IR
produced by revng so it can be parsed/accepted
for the LLVM MLIR Dialect.
- Introduce new pipeline branch: llvmir-to-mlir.yml.
- Add LLVMIRToMLIR step.
- Add ImportLLVMToMLIRPipe pipe.
During this phase (EnforceABI) the binary is not meant to be run
so the debug info is not useful anymore, so we are striping them
now in order to avoid taking care of them during the pipeline.
Change the serialization and deserialzation functions of
`FunctionStringMap` to use the GzipTarFile. Also change che filename
of the underlying containers accordingly.
The Decompiled container (which use FunctionStringMap) now uses
`.tar.gz` as the container format, as opposed to YAML. Change the
filename of the containers accordingly.
Add a run of `revng graphql` among the tests being run. This
leverages the new Component property to filter out any unwanted
artifacts from being produced.
`revng` now requires all pipeline files to have a `Component` field
which tells the command line driver to what component the pipeline
definition belongs to.
This commit introduces the concept of `Component` to a pipeline step.
This, in turn, can be used by clients to figure out which artifacts are
produced by which revng component.
Additionally, this commit overhauls the `revng daemon-self-test`
command, renaming it to `revng graphql` and adding extra flexibility.
* Fix non-PrimitiveTypes with low IDs.
* Ensure we use `revng model compare` to test the model.
* Updates the name to reflect the recent changes in naming convention
and in the way we represent `model::Type::ID`s.
This commit:
* Introduces `_` as a prefix for all non-user entities we emit in
decompiled code.
Also, some names have been changed to be more concise.
Specifically, the following entities have changed:
`_ENUM_UNDERLYING`, `_ABI`, `_REG`, `_padding_at_`,
`_artificial_struct_`, `_artificial_wrapper_`, `_stack`,
`_break_from_loop_`, `_var_`, `_stack_arguments`,
`_artificial_struct_returned_`, `_enum_max_value_`.
* Introduce _PACKED for `__attribute__((packed))`.
* `EnumEntry` name: drop the `EnumType` name prefix.
This commit switches `model::Type::ID` from being a GUID to be a
progressive number, in order to make things easier for humans.
On top of this, this commit introduces the following changes:
* TypeCopier: import all the necessary PrimitiveTypes and improve
handling of CustomName.
* Move Kind as the last field of the key of each TupleTree type used in
an `UpcastablePointer`.
* Update the ground truth of tests to ignore the `CustomName` in favor
of focusing on `OriginalName`.
* Increase adoption of `model::Binary::makeType`, equivalent to
`Binary.recordNewType(makeType<model::*Type>())`.
HexDumpPipe dumps content of binary file in the similar way as hexdump
tool with addition of PTML markup for instructions addresses.
Continuous parts of binary code are wrapped with <span
data-location-definition=""></span> where data-location-definition
attribute contains Entry/BasicBlock/Instruction addresses in generic
form. <span> tags can be nested if byte(s) belong to many instructions
in code.
At the end of the line every <span> is closed and opened on the next
line again if it still applies to the next byte.
MetaAddress are converted to IntervalMetaAddress (which implements own,
optional-less operator-) and stored in boost::icl::intruval_map. This
map is used to get addresses of instructions to which each byte belongs.
Change the way the tests capture the output of the daemon from `PIPE`
to `TemporaryFile`, as the latter avoids deadlocks related to the use of
the `Popen.wait` function in conjunction with `PIPE`.
This analysis will be used for the following features:
1) Edit Type in the Model
2) Edit Function Prototype in the Model
3) Add Type to the Model
It takes C code as an input, parses it and produces a Model
type that represents the C type.
This test case relies on simple program that calls function from
dynamically linked library (puts function). Function from Procedure
Linkage Table is a wrapper for this call and puts prototype (recognized
from debug symbols) should be propagated to `puts@plt` function.
Verification relies on `revng model compare`.
Fetching prototypes requires internet connection. Adding puts prototype
to test case's model makes it independent of the Internet connection.
The new value is `800000`, same as that of
`PenaltyBreakBeforeFirstCallParameter`.
Currenly there are no cases where this is relevant in the codebase
(since it was not allowed), so here's an artificial one to illustrate
the situation:
(behaviour before this commit)
```
auto x = short_whatever(
whatever_but_the_name_is_long("first", "second", "a long argument"));
```
(behaviour after this commit)
```
auto x = short_whatever(whatever_but_the_name_is_long("first",
"second",
"a long argument"));
```
This is necessary because i386 has weird sizes for `long double` that
result in `float86_t` in the model, so we need to pass additional
arguments to the recompilation tests, in order to avoid compiler errors.