15 Commits

Author SHA1 Message Date
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
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
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 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
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
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