Commit Graph

494 Commits

Author SHA1 Message Date
Your Name 35537a3bc4 tmp 2026-04-11 14:02:09 +02:00
Your Name 2e3b2ae7e0 tmp 2026-02-26 14:33:19 +01:00
Giacomo Vercesi 7743743e60 python: install wheel at build time
Install the wheels at build time, then copy the installed files
statically when installing.
2026-02-25 22:14:08 +01:00
Your Name 8840dc86fa tmp 2026-02-25 22:13:24 +01:00
Giacomo Vercesi a94c6a2636 pipebox: use native runners
When running in debug mode, use the native runners where possible.
2026-02-16 10:34:38 +01:00
Giacomo Vercesi 6b40322a3c revng2: implement wrappers
Implement wrappers in the `revng2` CLI, this allows running command with
e.g. `--gdb` to allow debugging.
2026-02-16 10:34:38 +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 d7e605fe63 pypeline: add debug mode
Add the functionality the the pipeline infrastructure and CLI to run
individual pipe and analyses as subcommands instead of in-process. This
allow better debuggability of individual pipes.
2026-01-29 15:00:12 +01:00
Giacomo Vercesi 8f2d0191d7 Pipe: add needed_files functions
In preparation for debugging individual pipes add an additional method
to the `Pipe` interface, `needed_files`, which allows the pipe to
statically report which files it will request ahead of time.
2026-01-29 14:54:24 +01:00
Giacomo Vercesi 1b732501ae revng2 quick: swap artifact and binary args 2026-01-29 14:54:24 +01:00
Giacomo Vercesi 62c1b44a54 revng: allow execution while in a venv
If a venv is running, the `revng` script should re-exec to allow the
correct modules to be loaded and allow running the `main` function of
the respective modules.
2026-01-29 14:54:24 +01:00
Giacomo Vercesi 9d8845de95 revng2: do not print stacktrace on SIGINT 2026-01-29 14:54:06 +01:00
Giacomo Vercesi cda0a9e508 revng2: allow execution in build directory
Change the logic in `python/scripts/revng` to allow executing it as
`revng2`. This allows running `revng2` in the build directory.
2026-01-29 14:26:42 +01:00
Giacomo Vercesi fd14580619 pipebox: improve signal handling
Improve the handling of signals by leveraging the `Py_AtExit`
functionality to trigger cleanup when the interpreter exits.
When receiving SIGINT handle it specially because exceptions in python
are only thrown when the interpreter is running and not when C code is.
2026-01-20 12:29:12 +01:00
Giacomo Vercesi 971cea5bf1 pype-cli: better propagate pypeline errors
Convert the `RuntimeError`s emitted by the pipebox (e.g. when checking
preconditions or running analyses) into `PypelineError`s and have the
pypeline cli infrastructure handle them gracefully, without emitting
stacktraces.
2025-12-19 10:29:28 +01:00
Giacomo Vercesi 7f7f9571a8 pypeline: implement container discarding
Add infrastructure to pypeline that allows containers to be notified
when they are being used last, this allows two things:
* `Pipe`s eagerly clearing those containers once they are done reading
  their contents
* `ScheduledTask`s clearing those out at the end of their execution in
  case the pipe did not do it
This overall should improve memory usage as container no longer take up
memory if they are no longer used as part of a `Schedule`.
2025-12-19 10:29:28 +01:00
Giacomo Vercesi 265af3768f Binary importers: fix debug info detection
Fix the behavior of binary importers by propagating the path of the
input binary from revng2 downwards, allowing finding `.debug` files in
the correct paths.
2025-12-19 10:28:29 +01:00
Giacomo Vercesi eefdca934b pypeline: give better names to some attributes
Rename some attributes of pypeline objects to better-suited names:
* `TaskArgument.to_container_decl` -> `TaskArgument.declaration`
* `PipelineNode.arguments` -> `PipelineNode.argument_declarations`
* `PipelineNode.arguments_with_access` -> `PipelineNode.arguments`
2025-12-19 10:26:49 +01:00
Giacomo Vercesi a2a7e6442b pypeline: move PipelineNode.run
Inline the body of `PipelineNode.run` into `ScheduledTask.run`, making
`PipelineNode` a pure data structure. This also allows eliding all the
arguments since all of them as properties of `ScheduledTask`.
2025-12-19 10:18:10 +01:00
Giacomo Vercesi 9338ac3486 pypeline: expand ScheduledTask's constructor
Move the arguments with a longer lifetime from the arguments of
`ScheduledTask`'s `run` function to its constructor.
2025-12-19 10:17:37 +01:00
Giacomo Vercesi 12c180bfd9 pypeline: convert uses of pypeline_logger.log
The `pypeline_logger.log` functions should only be used to convey
information to the user, all other uses should fall under `debug_log`.
2025-12-17 11:58:46 +01:00
Giacomo Vercesi 94b9ecad6c mass-testing: exclude paths from flamegraph
Add a new option to the mass-testing `meta.yml` that allows skipping
some paths when generating the flamegraph. In the case of revng this
allows skipping the intermediate python frames.
2025-12-12 15:46:49 +01:00
Giacomo Vercesi 8af5e1d05c Implement revng2 quick artifact 2025-12-10 16:16:14 +01:00
Giacomo Vercesi e3b263d9da Implement revng2 project init 2025-12-10 16:16:14 +01:00
Giacomo Vercesi f7231a29da Add yield-cfg to pypeline 2025-12-10 16:16:14 +01:00
Giacomo Vercesi 255748228a Add yield-call-graph-slice to pypeline 2025-12-10 16:16:14 +01:00
Giacomo Vercesi 83e770551b Add yield-call-graph to pypeline 2025-12-10 16:16:14 +01:00
Giacomo Vercesi 0d732f7a72 Add emit-cfg artifact to pypeline 2025-12-10 16:16:14 +01:00
Giacomo Vercesi 3a387238dc Add cleanup-ir to pypeline 2025-12-10 16:16:14 +01:00
Giacomo Vercesi 05dc279ef2 Add emit-c-as-single-file to pypeline 2025-12-10 16:16:14 +01:00
Giacomo Vercesi 0ffce5c5b2 Add emit-c to pypeline 2025-12-10 16:16:14 +01:00
Giacomo Vercesi 281484ad79 Add initial-auto-analysis list to pypeline 2025-12-10 16:16:14 +01:00
Giacomo Vercesi e35f5750de Add ConvertFunctionsToCABI analysis to pypeline 2025-12-10 16:16:14 +01:00
Giacomo Vercesi 9e8e4cdf85 Add AnalyzeDataLayout analysis to pypeline 2025-12-10 16:16:14 +01:00
Giacomo Vercesi 5a6efb0fa2 Add DetectStackSize analysis to pypeline 2025-12-10 15:05:53 +01:00
Giacomo Vercesi c1217dcfc3 Add DetectABI analysis to pypeline 2025-12-10 15:05:53 +01:00
Giacomo Vercesi 405733369b Add ImportWellKnownModelsAnalysis to pypeline 2025-12-10 15:05:53 +01:00
Giacomo Vercesi 47038d46ec Add ParseBinaryAnalysis to pypeline 2025-12-10 15:05:53 +01:00
Giacomo Vercesi 4086469dc1 Add make-segment-ref to pypeline 2025-12-10 15:05:53 +01:00
Giacomo Vercesi d664a59827 Add detect-stack-size to pypeline 2025-12-10 15:05:53 +01:00
Giacomo Vercesi 35ef98e83f LLVMPipe: make passes key lowercase
Since the rest of the pypeline yaml file is lowercase, convert the
`Passes` key of the configuration used by `pure-llvm-passes-*` to
lowercase.
2025-12-10 15:05:53 +01:00
Giacomo Vercesi fe73243cc5 pypeline-cli: fix autocomplete with pipebox init
Make it so the pipebox is initialized early if the pypeline CLI is in
autocomplete mode, otherwise some pipes might break.
2025-12-10 15:05:53 +01:00
Giacomo Vercesi afcdea4381 pypeline: also consider image/svg as text 2025-12-10 15:05:53 +01:00
Giacomo Vercesi cd3cd5c4d1 pypeline: fix Request.check
The function `Request.check` did not work properly due to
`Container.contains_all` performing the check with the operands swapped.
Fix the call and improve the body of `ObjectSet.issubset`.
Also improve the error message, highlighting the missing objects.
2025-12-10 15:05:53 +01:00
Giacomo Vercesi fdb0b4f025 revng2 project analyze: fix analysis arguments
When setting the variable names for the analysis' configuration,
sanitize the analysis' name, as it might contain dashes and other
undesirable characters.
2025-12-10 15:05:53 +01:00
Alessandro Di Federico bce32d9669 Default to --emit-hex-constant-literals-from=4096 2025-11-28 11:21:18 +01:00
Giacomo Vercesi 681e9543cf LocalStorageProvider: use table for model_paths
When running `invalidate`, use a temporary table to store the
invalidated model paths that need to be used. This saves to template
them into the query and allows them to be recycled later when the
`dependency` table needs to be cleaned up.
2025-11-26 16:13:28 +01:00
Giacomo Vercesi b1b5778822 Add infrastructure for custom invalidation
Add infrastructure to pypeline to allow for pipes to provide custom
invalidation, by implementing an `invalidate` function.
2025-11-26 16:13:28 +01:00
Giacomo Vercesi 8cff10e13b Introduce analyses that manipulate the model
Add 4 analyses to the pipebox that allow setting and verifying the model
and its diffs.
2025-11-26 16:13:28 +01:00
Giacomo Vercesi a821c0c268 pipeline yaml: allow specifying pure analyses
Some analyses do not require any container to run, these can be now
specified as a standalone array.
2025-11-26 16:13:28 +01:00