Commit Graph

280 Commits

Author SHA1 Message Date
Alessandro Di Federico 8e34aa3a3c revng-db: ensure CreateFileA is exported once 2026-05-15 11:43:22 +02:00
Alessandro Di Federico a225d26fa2 import-prototypes-from-db test: import ARM test 2026-05-15 11:43:22 +02:00
Alessandro Di Federico 9bc1e65125 import-prototypes test: merge .yml and .filecheck 2026-05-15 11:43:21 +02:00
Alessandro Di Federico 6e6105e8fe import-prototypes-from-db: add linux/x86-64 test
Smoke test that exercises the linux/x86-64 path: feeds malloc/calloc/
realloc plus a NonExistentFunction through the analysis and asserts that
the typed symbols pick up a prototype while the unknown one does not.
2026-05-15 11:27:33 +02:00
Lauri Vasama a46b3eead9 Remove x86-64 reduce-c-casts test 2026-05-04 10:49:08 +03:00
Alessandro Di Federico 2629f95dd1 Introduce ImportPrototypesFromDatabase
This commit introduces an analysis to import prototypes from a SQLite
database of well-known prototypes, typically built from debug info of
operating systems.

This analysis supersedes import-well-known-models.
2026-04-24 17:54:09 +02:00
Alessandro Di Federico 6894862ef2 Implement platform roots support
Refactor the binary import and dependency resolution infrastructure to
support multiple platforms (Linux, Windows, macOS) via a
configuration-driven root system.

Major changes:

* Overhaul PDB and DWARF importers for platform-aware debug info
  loading.
* Refactor LDDTree into a template-based architecture with
  platform-specific implementations (ELF, PE/COFF).
* Mostly rewrite the PDB importer, which had significant limitations.
2026-04-24 17:54:09 +02:00
Alessandro Di Federico eb9e82477a Introduce WindowsApiSetSchemaParser 2026-04-23 13:40:43 +02:00
Alessandro Di Federico 0385e4c652 Introduce revng::Configuration 2026-04-23 13:40:43 +02:00
Alessandro Di Federico 3a0bbb00c5 verify-abi-test-binaries.sh: limit --use-pdb usage 2026-04-23 13:40:42 +02:00
Alessandro Di Federico d977f26bce import-from-c test: improve error reporting 2026-04-23 13:40:42 +02:00
Pietro Fezzardi 4735dfb460 Fix model-migration.yml: bash negation 2026-04-10 15:27:24 +02:00
Giacomo Vercesi 96f2ad60b4 Fix scripting tests 2026-04-10 11:45:12 +02:00
Giacomo Vercesi ee7ce2d9a3 revng2 quick artifact: use subcommands
Make each artifact a subcommand of `revng2 quick artifact` so that it
behaves the same way as `revng2 project artifact`.
2026-04-10 11:45:12 +02:00
Ivan Krysak 754cfd57fe Model: introduce migration to version 9 2026-03-27 08:19:21 +00:00
Ivan Krysak 16f4be79bb Migration tests: ignore empty lines 2026-03-27 08:18:57 +00:00
Giacomo Vercesi 36f9dfe45b tests: leave TODO in tests to port/drop
Add TODOs to the test yamls of tests that are yet to be ported to the
new pipeline, the new backend or will be removed indefinitely when the
old pipeline is removed.
2026-03-05 14:23:06 +01:00
Giacomo Vercesi 26eca524d0 compare_isolate: exclude attributes
Blank out attribute identifiers and exclude attribute declaration lines,
as they might be swapped between executions.
2026-03-05 14:23:06 +01:00
Giacomo Vercesi 2a5c58791d Port tests to the new pypeline
Port as many tests as possible to use the `revng2`.
2026-03-05 14:23:06 +01:00
Giacomo Vercesi 4757cad690 pipeline-comparison: remove use of {push,pod}d 2026-03-04 14:58:02 +01:00
Ivan Krysak 22fe32afa2 Minor improvements 2026-02-25 12:47:27 +01:00
Giacomo Vercesi 728ee2bb96 Add end-to-end test for --debug 2026-02-16 12:17:56 +01:00
Lauri Vasama aa2597d13b model::Function: add stack frame name and comment
* StackFrameType() is removed.
* StackFrame() is introduced in its place.
* Use StackFrame().Type() to acess the stack frame type.
2026-02-13 08:41:39 +02:00
Giacomo Vercesi 01e9de1c34 compare_isolate.sh: don't compare declarations 2026-02-05 10:20:45 +01:00
Alessandro Di Federico f443bcc6da Model migration tests: suppress output 2025-12-22 11:34:46 +01:00
Alessandro Di Federico ce4f6ef996 llvmName: turn into a free function 2025-12-22 11:34:46 +01:00
Alessandro Di Federico 9d76a2ff52 for-collect-cfg: test Windows dynamic calls 2025-12-22 11:31:54 +01:00
Giacomo Vercesi 664eb497c1 isolate: selectively clone helpers
When performing `cloneFiltered`, instead of cloning all the helper
functions only clone those that are transitively called from the isolated
function.
2025-12-19 10:29:28 +01:00
Giacomo Vercesi e3b263d9da Implement revng2 project init 2025-12-10 16:16:14 +01:00
Giacomo Vercesi 47038d46ec Add ParseBinaryAnalysis to pypeline 2025-12-10 15:05:53 +01:00
Giacomo Vercesi 27f2407a36 pypeline-comparison: omit metadata in lift
Do not compare metadata when comparing `lift` as the output is still
non-deterministic in some instances.
2025-12-10 15:05:53 +01:00
Alessandro Di Federico 5045506ce0 model-migration: use no-op analysis 2025-12-03 17:59:19 +01:00
Alessandro Di Federico f435443630 tests: adopt emit-c over decompile 2025-12-03 17:59:19 +01:00
Alessandro Di Federico aa4120e1e2 tests/scripting.py: drop decompile, use emit-c 2025-12-03 17:59:19 +01:00
Tommaso Fontana fe3a5b6287 Pypeline: add --tar, --yaml to pype commands
Now commands 'pype project artifact' and 'pype pipeline run_pipe' now
accepts --format to specify in which format to serialize the resulting
container, and have --tar and --yaml shortcuts. Moreover, these commands
and 'pipe pipeline run_analysis' can automatically figure out the format
of containers so the user won't have to specify them most of the time.
2025-11-24 16:41:15 +01:00
Giacomo Vercesi e32c92b164 Add pypeline comparison tests
Add a set of tests to the test suite that compare the output of the new
pipeline (via `revng2`) to the output of the old one.
2025-11-18 17:47:54 +01:00
Giacomo Vercesi 57ae281403 verify-abi-test-binaries: remove orc shell
`orc shell` should not be used in the revng codebase in general,
moreover the PATH already contains all the entries needed to invoke the
`llvm-dwarfdump` command.
2025-11-17 10:04:12 +01:00
Alessandro Di Federico 81f063d30c Old backend: suppress -Wshift-count-overflow 2025-10-24 18:21:13 +02:00
Ivan Krysak 859e122081 EFA: make TTG verification more strict
Some stuff that was before implicitly checked during deserialization
now need explicit checks, those are introduced here.

This also fixes test failures related to the changed serialization
format (which fields can or cannot be omitted when they have
the default value).
2025-10-13 18:33:10 +03:00
Ivan Krysak 6c0c758e67 Model: make TTG verification more strict
Some stuff that was before implicitly checked during deserialization
now need explicit checks, those are introduced here.

This also fixes test failures related to the changed serialization
format (which fields can or cannot be omitted when they have
the default value).
2025-10-13 18:33:10 +03:00
Ivan Krysak cc57e57fd1 TTG: remove support for optional: true fields
After this commit, every non-key field is treated as if it was optional
while every key field (plus every auto-generated `Kind` field) - as if
it was required.
2025-10-13 18:33:10 +03:00
Ivan Krysak e56f543b1a Split module.bc.zstd 2025-10-13 10:26:41 +03:00
Ivan Krysak ed53e759c9 Do not use -Y flag
Yaml model are now the _only_ way to store them, no point in still
specifying the old flag for it.
2025-10-13 10:26:41 +03:00
Lauri Vasama 653d451e6c Remove undef name configuration support
Also adds a model migration removing
Configuration.Naming.UndefinedValuePrefix.
2025-09-29 18:05:55 +03:00
Ivan Krysak f03654564e Emit _STARTS_AT on fields with custom names 2025-09-05 10:15:32 +03:00
Ivan Krysak 3eea4c4094 Always emit _SIZE on struct definitions 2025-09-04 16:57:12 +03:00
Ivan Krysak c6a175a1b9 Rename _START_AT -> _STARTS_AT 2025-08-29 14:00:29 +03:00
Ivan Krysak 461c49df25 Model: bump version to 5 and introduce migration 2025-07-23 11:38:52 +02:00
Giacomo Vercesi 38b50c2977 tupletree: fix Reference class
Fix the `Reference` class, make it work with the new model and allow it
to be dereferences via the `_accessor` attribute.
2025-07-18 09:30:55 +02:00
Giacomo Vercesi 460ffbf965 project: move some methods to Binary
Move some methods from the `Project` class to `model.Binary`.
2025-07-18 09:30:55 +02:00