Alessandro Di Federico
b8b2fcff71
GenericGraph tests: zero initialize EdgeLabel::X
2023-06-30 12:35:18 +02:00
Alessandro Di Federico
84dd10cbdb
GenerichGraph.h: nullptr-initialize Edge::Neighbor
2023-06-30 12:35:18 +02:00
Alessandro Di Federico
b53d3f457b
Minor changes
2023-06-30 12:35:18 +02:00
Alessandro Di Federico
c2f7f62677
Merge branch 'gh/feature/fix-test-list'
2023-06-30 10:47:08 +02:00
Alessandro Di Federico
72947f0f71
tests: limit inputs to ensure 1-to-1 matching
2023-06-23 17:57:02 +02:00
Alessandro Di Federico
0ecfbf94b9
SystemV_x86: remove VectorArgumentRegisters
2023-06-23 17:56:09 +02:00
Alessandro Di Federico
42abf64c62
revng.cli: ensure proper exit code propagation
2023-06-23 17:55:41 +02:00
Alessandro Di Federico
942cc1323a
revng::verify: dump module upon failure
2023-06-23 17:54:55 +02:00
Alessandro Di Federico
fa61c784c2
Reintroduce st0_x86 as floating point return value
2023-06-23 17:54:16 +02:00
Alessandro Di Federico
55d433e020
Layout::verify: be stricter on return values
...
We now ensure that, if we have multiple return values, each one of them
covers at most one register.
2023-06-21 10:56:27 +02:00
Alessandro Di Federico
0af9b34a0a
Layout: make ReturnValues empty in case of void
2023-06-21 10:55:50 +02:00
Djordje Todorovic
f05c08547d
ptml: Introduce PTMLBuilder class
...
By using this class we can create ptml::Tags without
XML tags. It is useful in the revng-c part when we
want to generate Plain C. All PTML Tags, from now on,
should be created via this class only.
In addition, port `Yield` library to be using this.
2023-06-09 17:15:30 +02:00
Alessandro Di Federico
e1d65def59
Merge branch 'feature/jump-target-labels'
2023-05-25 13:55:14 +02:00
Ivan Krysak
66fc161f73
Assembly: choose disassembler based on basic block
...
Before now, it was choosen based on the function, but that led to
problems when disassembling thumb functions calling non-thumb PLTs.
2023-05-25 09:49:13 +02:00
Ivan Krysak
29eae116fd
Assembly: handle addresses in a special way
2023-05-25 06:37:40 +00:00
Ivan Krysak
5cdb1642bb
Assembly: rework tag processing
2023-05-25 06:37:30 +00:00
Ivan Krysak
f0a29f17b9
Assembly: Introduce address style options
2023-05-25 06:37:21 +00:00
Ivan Krysak
ec90ac0083
yield::Instruction: add getRelativeAddressBase
...
This helper computes the architecture-specific base for PC-relative
immediate originating from the given instruction.
2023-05-25 06:36:58 +00:00
Ivan Krysak
37d0a6cd62
yield::Tag: remove obsolete comparator
...
Due to the specifics of how `SortedVector` works, the comparator in
question was never used - keeping it will only lead to further confusion
2023-05-25 06:36:35 +00:00
Ivan Krysak
9dfc350b1a
Assembly: do not add "next instruction" as target
2023-05-25 06:36:26 +00:00
Ivan Krysak
c21f2649c9
Assembly: introduce new tags
...
This also reorders the enum, because when two tags collide (they have
the same `from` and `to` points, they are sorted based on the enum
values.
The new order ensures that the values we are more likely to choose
to preserve are closer to the bottom. Since each token can only have one
type associated with it, we choose the lowest one by default.
2023-05-25 06:36:02 +00:00
Ivan Krysak
6a407a94bf
Assembly: partition label helper
...
This moves the internal implemetation details into a separate
function `labelImpl` as well as renames the `label` into
`labelDefinition`.
2023-05-25 06:35:58 +00:00
Ivan Krysak
f3918e3305
Assembly: change label to accept BasicBlockID
2023-05-25 06:25:25 +00:00
Ivan Krysak
084bcfa57b
yield::Tag: remove a duplicate constructor
...
`using generated::Tag::Tag` already provides the same one.
2023-05-25 06:25:07 +00:00
Ivan Krysak
02978910b0
STLExtras: introduce zip_pairs skip flavour
...
I found that it leads to better looking code when the check of whether
the range in question even has enough elements to skip is inside
the helper.
As such a separate type of skip entry point was introduced: one that
allows to iterate over the container pairwise
Now, instead of asserting, the loop just does nothing in cases like
```cpp
for (const auto &Element : zip_pairs(make_empty_range())
do_stuff();
```
2023-05-25 06:25:07 +00:00
Ivan Krysak
d1cefaee04
PTML: ensure invalid labels are never emitted
2023-05-25 06:25:07 +00:00
Ivan Krysak
560bf16d1f
Disassembler: support arbitrarily sized tags
2023-05-25 06:25:07 +00:00
Ivan Krysak
4699c2da72
Assembly: remove ShouldSymbolizeOperands option
2023-05-25 06:25:07 +00:00
Ivan Krysak
f9a72125d3
Aseembly: accept relative jump targets
...
Drops the comment about an attempt to switch to the absolute targets
and sets `setPrintBranchImmAsAddress` to `false` no matter what
immediate style is selected.
2023-05-25 06:25:07 +00:00
Ivan Krysak
83e48bbc3a
LLVMDisassemblerInterface: remove unused argument
2023-05-25 06:25:07 +00:00
Ivan Krysak
378f6e76f7
daemon: fix uploading binaries from html
...
The html view daemon sends when connected directly was not correctly
migrated to support analysis lists.
2023-05-25 06:25:07 +00:00
Ivan Krysak
5b2af637de
Minor Changes
2023-05-25 06:25:07 +00:00
Alessandro Di Federico
3f1e6e6477
Merge branch 'feature/tier1-improvements-2'
2023-05-24 16:26:58 +02:00
Giacomo Vercesi
7f73e2bfde
revng.daemon: drop REVNG_PROJECT_ID
...
Remove the logic for computing a manager's workdir using the
REVNG_PROJECT_ID environment variable, as it was unused. The
REVNG_DATA_DIR remains to allow persistence across restarts.
2023-05-24 14:59:16 +02:00
Giacomo Vercesi
5d582a2eec
fetch-debuginfo: improve cache folder handling
...
Rework how the cache folder for debug information is handled. This
commit introduces an additional environment variable, `REVNG_CACHE_DIR`
that allows overriding where semi-disposable files will be stored.
2023-05-24 11:09:04 +02:00
Giacomo Vercesi
2b181e627c
fetch_debuginfo/common: improve download_file
...
Rework the code of `download_file` to leverage requests auto-decoding
option to auto-decompress the response body if needed.
2023-05-24 11:09:04 +02:00
Alessandro Di Federico
3c77bb5d17
Merge branch 'feature/dynamic-calls-in-call-graph'
2023-05-17 16:38:06 +02:00
Ivan Krysak
0170c0dfeb
Model: add segment overlap check to verification
2023-05-17 14:08:06 +02:00
Ivan Krysak
c838d2b019
CrossRelations: greatly simplify Relation Targets
...
This improves readability of the serialized version quite a bit.
2023-05-17 14:08:06 +02:00
Ivan Krysak
eae029d156
CrossRelations: merge IsCalledFrom flavors
...
`IsDynamicallyCalledFrom` is removed in favour of `IsCalledFrom`.
Looking at just how similar the actual uses of both are, there's not
much reason to keep them separate.
2023-05-17 14:08:06 +02:00
Ivan Krysak
641fb61f7b
EFA: upgrade buildControlFlowGraph
...
It now assumes that the nodes of the graph it constructs also require
the function entry point on top of the basic block ID.
2023-05-17 14:08:05 +02:00
Ivan Krysak
fade3ec01f
CallGraph: switch to pipeline::Location
2023-05-17 14:08:05 +02:00
Ivan Krysak
7322d1a845
ControlFlow: switch to pipeline::Location
2023-05-17 14:08:05 +02:00
Ivan Krysak
50b5abf505
Yield: add isEmpty() helper to graph nodes
2023-05-17 14:08:05 +02:00
Ivan Krysak
013696a939
yield: move SVG out of the ControlFlow
...
Since the file is also used for call graphs, it's placement is not ideal
2023-05-17 14:08:05 +02:00
Ivan Krysak
045cdefcac
GraphLayout: move outside of yield
2023-05-17 14:08:04 +02:00
Ivan Krysak
d99b0241e8
Minor improvements
2023-05-17 14:08:04 +02:00
Alessandro Di Federico
51e23cb99d
Merge branch 'feature/improve-cfep-detection'
2023-05-17 12:01:19 +02:00
Alessandro Di Federico
866e6edb10
Import CollectFunctions tests
2023-05-17 11:19:35 +02:00
Alessandro Di Federico
14b40ebe45
CFEP: ignore if already part of another block
...
We used to ignore CFEPs that matched the starting address of a basic
block of a previously detect function.
We now also exclude such CFEPs even if the candidate is *part* of an
existing block.
2023-05-17 11:19:32 +02:00