96 Commits

Author SHA1 Message Date
Alessandro Di Federico 934e2a92f5 Make argv non-const char * 2026-04-23 13:40:42 +02:00
Ivan Krysak f0e00d66ab Do not use doxygen for TODOs 2026-02-25 12:47:27 +01:00
Giacomo Vercesi 27f419c8cd Fix and ban namespace clobbering
Fix an instance where the `std` namespace got clobbered into the global
namespace by accident.
2026-02-16 10:34:38 +01:00
Alessandro Di Federico 5820908675 Remove and ban \file 2025-12-16 17:41:55 +01:00
Alessandro Di Federico c883bed765 Drop Logger's StaticEnabled feature 2025-10-31 17:25:03 +01:00
Ivan Krysak 16985c37ea Add comments clarifying error-related behavior 2025-10-13 10:26:41 +03:00
Ivan Krysak 0d9ea6db18 Inspector: drop a no-op llvm::consumeError 2025-10-08 12:22:34 +03:00
Giacomo Vercesi 8c76e7d2ef Cleanup Storage classes
Due to the removal of `S3StorageClient`, simplify the infrastructure
under `/Storage/`:
* Move and rename `LocalStorageClient` to `StorageClient`, de-virtualize
  all of its methods
* Move and rename `LocalWritableFile`, `LocalReadableFile` to
  `WritableFile` and `ReadableFile`, de-vitualize all methods
* Drop the `Std{in,out}StorageClient`, make `FilePath` handle the
  stdin/stdout logic
* Remove `setStorageCredentials` from `PipelineManager`
2025-05-07 16:42:34 +02:00
Khaled Ismaeel a52f1f17c2 Add automatic migrations in PipelineManager 2025-04-30 15:08:45 +02:00
Giacomo Vercesi a9a0fdc236 ELFImport: fix input file missing
When using revng through `revng daemon` the variable `InputPath` is not
populated, leading to `lddtree` failing silently. Fall back to the input
binary in the resume directory in case the the `InputPath` variable is
empty.
2025-03-14 13:05:39 +01:00
Giacomo Vercesi 74eba2954f revng trace run: log commands before execution
Log the commands that are going to be executed by `revng trace run` on
the `trace-runner` logger.
2025-03-13 16:23:21 +01:00
Giacomo Vercesi 51687a2f4f Runner.cpp: remove extra ; 2025-03-13 15:16:17 +01:00
Giacomo Vercesi 5b00a93660 revng trace run: skip setting credentials
The `rp_manager_set_storage_credentials` is now skipped when running a
trace in `revng trace run`. This is needed because the storage backend
when running a trace is replaced with a local one and calling the
function does not make sense.
2025-03-13 15:09:15 +01:00
Giacomo Vercesi 3a936a650c Tracing/Runner: lazily initialize CommandHandler
Avoid initializing `CommandHandler` statically, as this causes the
constructor to run every time `libPipelineC` is linked against.
2024-11-25 16:25:48 +01:00
Giacomo Vercesi 1b6ff00595 Tracing/Runner: delay registering signal handlers
On the C++ side of revng it is important that LLVM's signal handlers are
registered within the initialization of `revng::InitRevng`, as this
allows downstream users (e.g. `revng daemon`) to preserve its signal
handlers before setting up the C++ infrastructure. In
`Tracing/Runner.cpp` there's `CommandHandler` which is statically
initialized and called `llvm::sys::AddSignalHandler`, this happened at
`dlopen` time, breaking the promise outlined above. Rework the code so
that the function is called lazily instead of statically.
2024-11-25 14:55:01 +01:00
Ivan Krysak 672ee5df50 Replace std::string_view with llvm::StringRef 2024-11-06 15:43:13 +02:00
Ivan Krysak 1eb80ecd2d Introduce an error creation helper 2024-11-06 15:20:37 +02:00
Alessandro Di Federico 9c47c92af2 Target::PathComponents: use SmallVector<1> 2024-10-30 19:30:04 +01:00
Alessandro Di Federico a0c670652c Improve usages of Expected<T> 2024-10-10 14:50:26 +02:00
Alessandro Di Federico c1cbb4e9a0 Initialize pointers to nullptr 2024-09-27 12:07:17 +02:00
Alessandro Di Federico 2cdedc71f4 s/serialize/toString/
We keep serialize for method dealing with streams.
If it returns a `std::string`, let's use `toString`.
2024-09-27 12:07:17 +02:00
Alessandro Di Federico 7b00473859 PDBImporter: rework .pdb search 2024-08-05 17:41:34 +02:00
Ivan Krysak b25a32de2a Stop using std:: prefix for std::size_t 2024-01-29 11:57:54 +02:00
Giacomo Vercesi 56abe3b797 Tracing/Runner: improve pointer vector handling
Wrap vectors of pointers in the new `PointerVector` class which
automatically poisons the tail of the vector and unpoisons it on
destruction.
2023-11-03 18:29:10 +01:00
Giacomo Vercesi da144f1fee revng trace run: allow providing resume directory
Allow the `revng trace run` to provide a resume directory from the
command line to use when creating the first manager.
2023-11-03 18:29:10 +01:00
Giacomo Vercesi 94aa2b51d2 Add Context Global Index 2023-11-03 12:13:58 +01:00
Giacomo Vercesi 04698bb550 Return invalidations when deserializing container
When deserializing a container in the pipeline, return the invalidations
that have been caused by the container changing content.
2023-11-03 12:13:58 +01:00
Giacomo Vercesi 56af9c1f9d Propagate errors from Analysis/Pipes to daemon
Leverage the `rp_error` mechanism to propagate errors from analyses and
pipes to the GraphQL schema.
2023-11-03 12:13:58 +01:00
Giacomo Vercesi 3b0d708a2f Drop custom globals mutator from PipelineC
Remove globals mutator from PipelineC api, as there are analyses present
that allow changing them.
2023-11-03 12:13:58 +01:00
Giacomo Vercesi d6890473f4 PipelineC: add missing null checks 2023-11-03 12:13:57 +01:00
Giacomo Vercesi e2504dd6f2 Implement storage credentials update
Add the functionality to rev.ng's infrastructure to allow to dynamically
update the credentials of the underlying storage provider at runtime.
2023-09-14 17:32:08 +02:00
Giacomo Vercesi 0c5bc8c120 Drop unused functions from PipelineC
Remove all the functions that are no longer needed by `revng.api`.
2023-09-14 15:44:33 +02:00
Giacomo Vercesi f710af9f2f Cleanup revng.daemon graphql API
Drop autogenerated queries from the GraphQL API and switch `revng.api`
to use `PipelineDescriptor`.
2023-09-14 15:44:33 +02:00
Giacomo Vercesi 0b2754c824 pipeline: drop Disk from storage methods
This commit changes the following method names across the codebase:
* `storeToDisk` -> `store`
* `loadFromDisk` -> `load`
This has been done since the storage is no longer bound to the local
storage.
2023-09-06 15:23:43 +02:00
Giacomo Vercesi 93d3a6238d revng: introduce S3 support
Add the capability for all revng tooling to run with an S3-backed
workdir.
2023-09-06 15:23:43 +02:00
Giacomo Vercesi a84ebd0e51 revng.daemon: trim Eventmanager's functionality
Drop most of the functionality provided by EventManager. Add the
functionality that allows saving the working directory after a period of
inactivity.
2023-09-06 15:23:43 +02:00
Giacomo Vercesi e719b3b7e5 Add components to revng cli driver
This commit introduces the concept of `Component` to a pipeline step.
This, in turn, can be used by clients to figure out which artifacts are
produced by which revng component.
Additionally, this commit overhauls the `revng daemon-self-test`
command, renaming it to `revng graphql` and adding extra flexibility.
2023-08-23 17:45:36 +02:00
Giacomo Vercesi db7ad24175 PipelineManager: add produceTargets with checks
Move much of the logic of `rp_manager_produce_targets` to a method
inside `PipelineManager`, add additional checks for the existence of the
targets that are requested to be produced.
2023-07-31 16:05:51 +02:00
Ivan Krysak 7d235f4fd0 Enforce licence header consistency
Also do some basic cleanup: capitalize first letters, add `.`
at the end of the sentences, and so on.
2023-07-03 15:23:10 +00:00
Ivan Krysak ee0dc1866d Forbid clang format off 2023-07-03 15:23:10 +00:00
Ivan Krysak a123ec2c35 Remove clang-format off around concepts
Now that clang-format no longer breaks anything involving a concept or
a requires clause on sight, these are no longer necessary
2023-07-02 13:20:49 +02:00
Ivan Krysak bc98e0079f Formatting: change PenaltyReturnTypeOnItsOwnLine
The new value is 21.
2023-07-02 13:20:49 +02:00
Giacomo Vercesi 31cd2b53f9 rcc: add codespell
Add codespell to the list of checks performed by
revng-check-conventions. This should reduce the amount of typos present
in the revng codebase.
2023-05-11 10:05:32 +02:00
Alessandro Di Federico f68185abc9 Push ParseCommandLineOptions into InitRevng 2023-04-28 14:34:35 +02:00
Giacomo Vercesi a2b7d0e0bf PipelineC: add tracing
Add support for tracing onto the PipelineC. This is done by:
1. Creating wrapper functions for each PipelineC function with the
   script in `scripts/PipelineC_add_tracing.py`. These will call a
   special function called `wrap` which will ultimately call a method
   with a `_` prepended to the name
2. Conversion of all PipelineC methods in `PipelineC.cpp` to `static`
   and their rename with a `_` in front, in order for them to work with
   the wrapper function in (1)
3. Generation of 2 additional include files, one for types and one for
   functions, to be used by users of tracing files in order to have
   introspection.

These steps allow the creation of a trace file with the use of the
`REVNG_C_API_TRACE_PATH` environment variable. The traces can then be
used in conjunction with the `revng trace run` and `revng trace
inspect` commands.
2023-04-20 14:43:13 +02:00
Giacomo Vercesi 19bb38d32b PipelineC: fix UAF on rp_targets_list
The underlying rp_target pointer was not stable, switch to returning a
copy of the target instead.
2023-04-20 14:43:13 +02:00
Giacomo Vercesi 8d89c6a318 PipelineC: rp_initialize: only use argc and argv
Switch from specifying `libraries` and `pipelines` in `rp_initialize`
and `rp_manager_create` to the use of command-line options that are to
be passed via `argc` and `argv` in `rp_initialize`.
2023-04-20 14:43:12 +02:00
Giacomo Vercesi 9a972009d1 PipelineC: size and const-correctness
Fix the return type (often mismatched from uint64_t to int) and the
const-correctness of many functions in PipelineC
2023-04-20 14:43:12 +02:00
Alessandro Di Federico 394111ed40 Add missing includes 2023-04-08 08:42:24 +02:00
Giacomo Vercesi 2e96e09f63 Drop analyze-all
Drop all the uses of analyzeAll and swap its use with the invocation of
the appropriate analysesList
2023-03-22 17:50:02 +01:00