Commit Graph

6113 Commits

Author SHA1 Message Date
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
Ivan Krysak 2e83058e83 Update rank naming convention 2022-08-05 13:55:24 +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
Antonio Frighetto e06f9841ed DLA/Frontend: support Segment.Type struct already filled
Avert DLA's middle-end from performing optimizations by
making new segment nodes point placeholder nodes.
2022-07-29 11:05:22 +02:00
Djordje Todorovic 929bb58e68 Handle float80 type
This was needed in order to handle some PDB files.
2022-07-29 09:24:21 +02:00
Pietro Fezzardi 7948d8ce56 MakeModelGEPPass: ignore callees of indirect calls 2022-07-29 09:24:21 +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
Giacomo Vercesi 3ec42fb3f8 _capi.py: don't wrap NULL in ffi.gc 2022-07-28 08:43:55 +02:00
Giacomo Vercesi 08c53ecdde FunctionControlFlowGraphSVG is now a FunctionKind 2022-07-28 08:43:07 +02:00
Alessandro Di Federico d42fb9bb13 Segment::verify(): relocations can be out segment
We used to check that the target address of a relocation needs to be
within the `model::Segment` it's referring to.
However this is not correct.
2022-07-27 18:57:21 +02:00
Alessandro Di Federico 2ea79277e0 Merge branch 'feature/fix-signal-handlers-lint' 2022-07-26 10:31:48 +02:00
Davide Depau 7a067bd172 Fix lint issues due to usage of abort() 2022-07-26 10:31:44 +02:00
Davide Depau 6dd80c7167 Fix lint issues from signal handler changes 2022-07-26 09:52:30 +02:00
Davide Depau 63ba4bc5e5 Fix lint issues in bad behavior tests 2022-07-26 09:52:30 +02:00
Massimo Fioravanti da30cf9e99 Pipeline: add read-only containers 2022-07-25 16:24:27 +02:00
Alessandro Di Federico ca29af30b3 Merge branch 'feature/signal-handlers' 2022-07-22 21:06:23 +02:00
Davide Depau e9cfac1727 Add InitRevng signal handlers to PipelineC API 2022-07-22 21:04:03 +02:00
Davide Depau 363fa21fe0 Introduce PipelineC API shutdown method 2022-07-22 21:04:03 +02:00
Davide Depau c034c67c58 Add tests for stack trace signal handler
This ensures that, on crash, revng-pipeline prints a stack trace
2022-07-22 21:04:03 +02:00