Commit Graph

1303 Commits

Author SHA1 Message Date
Alessandro Di Federico 5c9b6ed9b3 Rename DILogger into Log 2024-08-16 13:27:00 +02:00
Alessandro Di Federico 09e483f96b BinaryImporter: create a Function for EntryPoint 2024-08-16 13:01:59 +02:00
Alessandro Di Federico cba1d6fa51 PDBImporter: fix .pdb path lookup 2024-08-16 13:01:57 +02:00
Alessandro Di Federico 024c9abda2 Step: fix use-after-free 2024-08-07 16:07:59 +02:00
Alessandro Di Federico 744184c90c Do not use CallBase::getCalledFunction
Use our wrapper, which does not return nullptr if the `FunctionType`s do
not match.
2024-08-07 16:07:59 +02:00
Alessandro Di Federico 05b6989274 FunctionPass: add tracing 2024-08-07 16:07:59 +02:00
Alessandro Di Federico ae7e7a0bc7 IsolateFunctions: add tracing 2024-08-07 16:07:59 +02:00
Alessandro Di Federico ee2d2e25c6 InlineHelpers: add tracing 2024-08-07 16:07:59 +02:00
Alessandro Di Federico 09bc315448 Pipeline: improve invalidation logging 2024-08-07 16:07:59 +02:00
Ivan Krysak 336fac0a67 ABI: do not assert when offset is not aligned
Abort the conversion instead.
2024-08-06 10:26:34 +02:00
Alessandro Di Federico d3b945c6c2 PECOFFImporter: use Generic Segment::StartAddress 2024-08-05 18:00:27 +02:00
Alessandro Di Federico fa6249edc0 Isolate: add FunctionTag to declared functions 2024-08-05 17:42:04 +02:00
Alessandro Di Federico 7b00473859 PDBImporter: rework .pdb search 2024-08-05 17:41:34 +02:00
Alessandro Di Federico effc91689c Introduce early-type-shrinking 2024-07-10 16:19:27 +02:00
Alessandro Di Federico 06023b4555 BitLivenessWrapperPass::dump 2024-07-10 16:19:26 +02:00
Alessandro Di Federico 7ddae47040 Minor changes 2024-07-10 15:34:19 +02:00
Alessandro Di Federico df8f4db512 MachOImporter: set DefaultABI 2024-07-09 08:58:51 +02:00
Alessandro Di Federico 901a78a66f Lift: fix usage of empty instead of isEmpty 2024-07-09 08:58:51 +02:00
Alessandro Di Federico 6f47a8af5a MaterializedValue: ignore alloca 2024-07-09 08:58:51 +02:00
Alessandro Di Federico 3c839cb821 Pipe::mutableContainers: use running containers 2024-07-09 08:58:51 +02:00
Alessandro Di Federico 966caa4137 revng artifact: fix handling of target arguments
This commit adds to `revng artifact` help the part of the command line
accepting a list of targets.
Also, it fixes the parsing of targets.
2024-07-09 08:58:51 +02:00
Alessandro Di Federico 1981f5a433 Minor changes 2024-07-09 08:58:51 +02:00
Pietro Fezzardi 7fa7b3cbe2 PTMLIndentedOstream: honor GenerateTagLessPTML
Before this commit PTMLIndentOstream was still emitting tag around
indentation, even when GenerateTagLessPTML was true.
This commit fixes the problem.
2024-06-27 22:10:01 +02:00
Ivan Krysak e52dd97937 TypeSystemPrinter: improve formatting
- change the font of the emitted graph to `Courier`, which is the only
  monospace font graphviz guarantees to support
- tweak color of the union definitions to be slightly lighter (so that
  it doesn't clash as much with the other colors used)
- change the color of all the "other" nodes (like typedef) from white
  to grey, so that they are visible on light backgrounds.
- leave a todo about `buildFieldName` being obsolete.
2024-06-27 11:05:52 +02:00
Ivan Krysak 4a2db0ba4f UpcastablePointer: streamline empty behavior 2024-06-27 11:05:52 +02:00
Ivan Krysak 2ae19ef30a DynamicFunction: ban / in the name 2024-06-27 11:05:51 +02:00
Ivan Krysak 823e561806 TTG: rework polymorphic serialization
For now, the only serialization trait we were verifying
a polymorphic TTG type to have was the wrong (the one
that only printed base class's fields).

This commit explicitly disables said serializer and
ensures it's never used.

Here's an illustration of the impact of the changes:
```
model::UpcastableType MyType = getTypeFromSomewhere();
model::Type &View = *MyType;
model::PointerType &Pointer = MyType->asPointer();

serialize(MyType); // Good
serialize(Pointer); // Good
serialize(View); // new: explicit error
                 // old: only print base type's fields
```
2024-06-27 11:05:51 +02:00
Ivan Krysak 3c974fea7c Model: make purge-invalid-types softer 2024-06-27 11:05:51 +02:00
Ivan Krysak 51208789a0 Rename ThePTMLBuilder into just B 2024-06-27 11:05:51 +02:00
Ivan Krysak 776a5cdc52 Model: move path data away from the header 2024-06-27 11:05:51 +02:00
Ivan Krysak f3c020ffb3 EnforceABI: ensure every function has a prototype 2024-06-27 11:05:51 +02:00
Ivan Krysak dfa7478685 Adopt reworked model::Type 2024-06-27 11:05:51 +02:00
Ivan Krysak 925690a1e1 VerifyHelper: reduce pointer usage 2024-06-27 11:05:50 +02:00
Ivan Krysak b6625e8913 Model: simplify fixModel pass
Instead of getting reimplemented/updated, it now just reuses normal
type verification routines.
2024-06-27 11:05:50 +02:00
Ivan Krysak 94c9e9d4dd Make verifys inside asserts strict 2024-06-27 11:05:50 +02:00
Ivan Krysak 39264e73fa Model: introduce new Type system 2024-06-27 11:05:50 +02:00
Ivan Krysak b33eb7cf70 Model: reduce pointer usage in verify 2024-06-27 11:05:50 +02:00
Ivan Krysak e8288d1e70 Model: reorganize verifier order
This helps keeping track of them and making sure none of them is lost.

The order is bottom-to-top, so ends with `model::Binary::verify` and
contains verification of all of its dependencies in the order they
appear in their user's `verify`s, kind of like a flattened tree.
2024-06-27 11:05:49 +02:00
Ivan Krysak 277cba213c Model: separate verification 2024-06-27 11:05:49 +02:00
Ivan Krysak 9e6bf29f74 TTG: pull dump helper into the template 2024-06-27 11:05:49 +02:00
Ivan Krysak 927e8006b9 Model: rename TypePath to DefinitionReference 2024-06-27 11:05:49 +02:00
Ivan Krysak 35444268b3 TTG: strip Kind from the child constructor 2024-06-27 11:05:49 +02:00
Ivan Krysak 6a1018b860 Remove unused linter suppressors 2024-06-27 11:05:48 +02:00
Ivan Krysak ac587cbb4f Model: rename Type into TypeDefinition 2024-06-27 11:05:48 +02:00
Ivan Krysak 26c68b78ea Model: drop makeTypeWithID 2024-06-27 11:05:48 +02:00
Ivan Krysak 84c8822c37 Model: drop TypedRegister 2024-06-27 11:05:48 +02:00
Ivan Krysak 7ff1a0f487 Model: remove mostly unused Types.h header 2024-06-27 11:05:48 +02:00
Ivan Krysak b2959e36df Minor improvements 2024-06-27 11:05:48 +02:00
Alessandro Di Federico 398681c5ce Introduce tests for invalidation 2024-06-25 09:50:38 +02:00
Alessandro Di Federico 3e8764093e RawFunctionType return type: adopt literal struct 2024-06-20 10:24:51 +02:00