Commit Graph

1900 Commits

Author SHA1 Message Date
Ivan Krysak b3f9ce7cc2 Use locations in PTML exporter 2022-08-05 21:47:05 +03:00
Ivan Krysak 7b7c4c25b9 Standardize the pipe names to use CamelCase 2022-08-05 21:46:46 +03:00
Ivan Krysak dff7c5f37d Move yield pipes into revngYield 2022-08-05 21:46:28 +03:00
Massimo Fioravanti c97187fd0e Add cross relations role 2022-08-05 21:45:19 +03:00
Ivan Krysak 191fc99c1c Add a pipe for call-graph processing 2022-08-05 20:45:16 +02:00
Ivan Krysak 8f4590bf00 Outline the cross-relation interface 2022-08-05 21:42:58 +03:00
Ivan Krysak 67bff75b7f Add basic location tests 2022-08-05 21:42:45 +03:00
Ivan Krysak fe04a13a5b Introduce basic location support 2022-08-05 20:42:41 +02:00
Ivan Krysak 1ac6d6ea0d Introduce constexpr string splitter 2022-08-05 21:02:29 +03:00
Ivan Krysak 1b0fb2adfc Introduce constexpr repeat helpers 2022-08-05 20:59:02 +03:00
Ivan Krysak 792da8151e Redesign the rank definition process 2022-08-05 19:58:57 +02:00
Ivan Krysak 44fbe3e18b Rename abi::IsTrait into abi::TraitLike 2022-08-05 17:27:56 +03:00
Ivan Krysak 65d1a016d4 Standardize concept naming across the codebase 2022-08-05 17:27:56 +03:00
Ivan Krysak 4ee2835d52 Fix a trait inheritance problem 2022-08-05 17:27:56 +03:00
Ivan Krysak 409486609c Add EqualityComparable concept 2022-08-05 17:27:56 +03:00
Ivan Krysak 8dce9ef724 Fix the problem with negative node ranks
Having the initial rank threshhold too low caused them to sometimes
loop around and become negative, causing problems later down the line.

This sets the rank of the "entry" node to 4 offsetting the possible
causes of this issue quite a bit.
2022-08-05 17:27:56 +03:00
Ivan Krysak 240f334d78 Fix minor wording issues 2022-08-05 17:27:56 +03:00
Ivan Krysak 4ffadb2144 Fix an iteration invalidation caused issue 2022-08-05 17:27:56 +03:00
Ivan Krysak 9610051df9 Fix yaml traits to correctly [de]serialize scalars 2022-08-05 17:27:56 +03:00
Ivan Krysak de99de78ae Add key overloads for model::getTypePath 2022-08-05 17:27:56 +03:00
Ivan Krysak 165964bde1 Add a ConstexprString container to ADT 2022-08-05 17:27:56 +03:00
Ivan Krysak 8305e020b0 Move ranks into their own namespace 2022-08-05 17:27:56 +03:00
Ivan Krysak c21d8398e6 Move ranks into a separate header 2022-08-05 17:27:56 +03:00
Alessandro Di Federico add47a861a EnforceABI: use read-only model 2022-08-05 14:39:29 +02:00
Alessandro Di Federico c2651f7218 importBinary: fail if no architecture is specified 2022-08-04 17:27:06 +02:00
Alessandro Di Federico 01ed4fb687 PCH: handle a dispatcher with 0 elements 2022-08-03 18:36:52 +02:00
Alessandro Di Federico 5f49437393 CodeGenerator: invoke peek post newpc creation 2022-08-03 18:35:57 +02:00
Alessandro Di Federico 9046977506 Merge branch 'feature/improve-pe-support' 2022-07-28 15:50:28 +02:00
Djordje Todorovic ee686ef158 import-pe: Add more tests for type system 2022-07-28 15:04:26 +02:00
Djordje Todorovic 1243d1061c Introduce revng model hard-purge
In addition, introduce a new model Pass:

  revng model opt -prune-unsused-types
2022-07-28 15:02:55 +02:00
Djordje Todorovic d69020745d import-pe: Add tests 2022-07-28 15:02:49 +02:00
Djordje Todorovic fdb12947a2 Introduce revng model download-pdb 2022-07-28 14:52:50 +02:00
Djordje Todorovic 46bc14bc73 Model: Add an opt for user defined paths of PDB 2022-07-28 14:52:50 +02:00
Djordje Todorovic a36e22729f Model: Add PDB support 2022-07-28 14:52:50 +02:00
Djordje Todorovic 9efb9cb55f Model: Add parsing of delay dyn syms to PECOFF
This parses dedicated symbols similar to ELF's lazy linking.
2022-07-28 14:52:02 +02:00
Djordje Todorovic b3cd1316f0 ELFImporter: Fix the documentation comment 2022-07-28 14:52:02 +02:00
Djordje Todorovic 098f864d8d Model: Add parsing of dyn syms to PECOFFImporter
This parses symbols similar to ELF's .dynsym.
2022-07-28 14:52:02 +02:00
Djordje Todorovic b79158bafc Model: Add parseSymbols() to PECOFFImporter
This parses symbols similar to ELF's .symtab.
2022-07-28 14:52:02 +02:00
Djordje Todorovic 9d18d84f68 ELFImporter: Improve the parseSymbols()
This is an NFC.
2022-07-28 14:52:02 +02:00
Djordje Todorovic 5a72d968e5 Model: Add a method for parsing pe sections hdrs
This is an NFC.
2022-07-28 14:52:02 +02:00
Djordje Todorovic 8cbdcf278d Model: Import PE when file size is > than virtual
Without this patch, the import part would fail with an assertion
even for a simple case since it doesn't expect that file size
could be larger than virtual.

From the microsoft documentation:
```
Because the SizeOfRawData field is rounded but the VirtualSize field
is not, it is possible for SizeOfRawData to be greater than
VirtualSize as well. When a section contains only uninitialized data,
this field should be zero.
```
We rather choose not to percolate this into the Model.
2022-07-28 14:52:02 +02:00
Djordje Todorovic 6d390af909 Model: Factor target-dep code out of ELFImporter 2022-07-28 14:51:40 +02:00
Alessandro Di Federico 93a7799052 Merge branch 'feature/ptml' 2022-07-28 08:50:25 +02:00
Giacomo Vercesi 7a9c88e9e7 Introduce revng ptml
This Oython tool will be used to easily work with PTML.

It currently features two subcommands:

* `cat` prints a PTML to the terminal, with color formatting if
  possible;
* `strip` will strip a file of the PTML markup;
2022-07-28 08:49:09 +02:00
Giacomo Vercesi 1a7503183a revng.cli: dynamically load commands
Now `revng.cli` houses the core command-line driver while the individual
commands have been moved to `revng.cli._commands` and are dynamically
loaded.
2022-07-28 08:48:30 +02:00
Giacomo Vercesi b18dc3ac86 TypeScript: add toString to string types 2022-07-28 08:48:16 +02:00
Giacomo Vercesi 09009836a1 PipelineC: expose globals verification 2022-07-28 08:47:46 +02:00
Giacomo Vercesi 3e9058393e Rework YieldAssemblyHTML to output PTML 2022-07-28 08:47:34 +02:00
Giacomo Vercesi efc2d36a14 Introduce ptml namespace
The `ptml` namespace contains utilities for easier PTML manipulation.
These include:

* A few constants (e.g. standard attributes) available in
  `revng/PTML/Constants.h`
* The `Tag` class to easily construct html/xml tags with attributes
  without having to use format strings.
* The `PTMLIndentedOstream`, a llvm::raw_ostream wrapper that
  automatically adds tagged indentation to the output
2022-07-28 08:47:17 +02:00
Giacomo Vercesi cc8c6ea203 TupleTree: add ScalarTraits for non-composite keys
Non-composite keys are single-element tuples, therefore they don't
directly inherit the YAML serialization of their only element.

This commit enables building `ScalarTraits` for keys in all cases.
2022-07-28 08:44:57 +02:00