Alessandro Di Federico
6a6cd939db
Rework EarlyFunctionAnalysis
2022-08-08 13:55:34 +02:00
Alessandro Di Federico
a844589739
ProgramCounterHandler: align PC address
...
ProgramCounterHandler now emits code masked with an alignment mask to
ease the job of various analyses.
2022-08-08 13:55:26 +02:00
Alessandro Di Federico
562bb9959d
Reimplement GCBI::getBlocksGeneratedByPC
...
GCBI::getBlocksGeneratedByPC has been reimplemented using recursive
coroutines. Caching dominator trees was very error-prone.
2022-08-08 13:55:26 +02:00
Alessandro Di Federico
f2bd49d562
defaultPrototype: set FinalStackOffset
2022-08-08 13:55:26 +02:00
Alessandro Di Federico
f236a490c3
GCBI::getSuccessors: make .Other additive
...
Previously, if `.Other` was set, all the other fields where unset.
2022-08-08 13:55:25 +02:00
Alessandro Di Federico
4eb70b0e35
Reimplement exitTBCleanup
2022-08-08 13:55:25 +02:00
Alessandro Di Federico
4d69437548
Split moveBlocksInto off moveToNewFunctionType
2022-08-08 13:55:25 +02:00
Alessandro Di Federico
b07d134b73
Introduce CanonicalRegisterValues in the model
...
These canonical values ease certain analysis that can assume their value
at function entry.
2022-08-08 13:55:25 +02:00
Alessandro Di Federico
0566381ecf
ELFImporter: make importing more robust
2022-08-08 13:55:25 +02:00
Alessandro Di Federico
e0e8b4e5b6
ELFImporter.cpp: s/Log/ELFImporterLog/
2022-08-08 13:55:25 +02:00
Alessandro Di Federico
8e358d6609
Introduce additional assertions
2022-08-08 13:54:41 +02:00
Alessandro Di Federico
81c2a93add
Normalize FilePortion
2022-08-08 13:54:41 +02:00
Ivan Krysak
b3f9ce7cc2
Use locations in PTML exporter
2022-08-05 21:47:05 +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
792da8151e
Redesign the rank definition process
2022-08-05 19:58:57 +02:00
Ivan Krysak
65d1a016d4
Standardize concept naming across the codebase
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
8305e020b0
Move ranks into their own namespace
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
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
Pietro Fezzardi
7948d8ce56
MakeModelGEPPass: ignore callees of indirect calls
2022-07-29 09:24:21 +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
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
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
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
Massimo Fioravanti
da30cf9e99
Pipeline: add read-only containers
2022-07-25 16:24:27 +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
0d55cd4c51
Do not explicitly print stack trace on abort
...
Let the signal handler take care of that
2022-07-22 21:04:03 +02:00
Antonio Frighetto
4bc21328d8
Model: reserve type prefixes
2022-07-22 16:10:51 +02:00
Antonio Frighetto
5500fadb0e
MachOImporter: add segment name
2022-07-22 16:10:51 +02:00