Commit Graph

2929 Commits

Author SHA1 Message Date
Alessandro Di Federico 077a6e2629 Importers: ignore unmapped code
This commit ensures that parts of the model that must point to code
(specifically `Binary::EntryPoint`, `Binary::ExtraCodeAddresses` and
`Function::Entry`) actually point to a segment mapped as +x.
2024-11-28 14:04:36 +01:00
Alessandro Di Federico 37feb2dd77 Binary::verify: verify executable addresses
Fail if code addresses are not within an executable segment.
2024-11-28 14:04:36 +01:00
Alessandro Di Federico 278c6f625c Importers: first of all, Segments
This commit makes sure that before setting EntryPoint, adding
ExtraCodeAddresses or Function entry points, we completed the processing
of Segments.
2024-11-28 14:04:36 +01:00
Alessandro Di Federico d1252046ce Importers: do not set EntryPoint, if absent 2024-11-28 13:58:29 +01:00
Alessandro Di Federico 1e2a55e372 Minor changes 2024-11-28 13:58:28 +01:00
Alessandro Di Federico 6e733427bc emitMessage: fix function calle emission 2024-11-27 17:18:39 +01:00
Alessandro Di Federico 11d8515f46 ModelToHeader: adjust blank lines 2024-11-27 17:18:12 +01:00
Giacomo Vercesi 58b326b8fa ZstdStream: remove manual memory management
Remove the use of manual memory management, convert to the use of
`std::unique_ptr`.
2024-11-26 09:48:37 +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
Alessandro Di Federico 143c315196 Merge revng-c into revng 2024-11-21 10:50:55 +01:00
Alessandro Di Federico efcea8ae48 importBinary: fix error handling 2024-11-12 18:05:48 +01:00
Alessandro Di Federico bbd527ae51 DecompileToDirectory: do not emit PTML 2024-11-12 14:28:21 +01:00
Ivan Krysak 4582982075 Replace std::string_view with llvm::StringRef 2024-11-06 19:18:53 +02:00
Ivan Krysak 7a827b4ef5 Use doxygen for header grouping 2024-11-06 19:18:53 +02:00
Ivan Krysak 64446d0453 Adopt name builder across the model users 2024-11-06 19:18:53 +02:00
Ivan Krysak efbc5cdd5c Introduce an error creation helper 2024-11-06 19:18:53 +02:00
Ivan Krysak 672ee5df50 Replace std::string_view with llvm::StringRef 2024-11-06 15:43:13 +02:00
Ivan Krysak 8e3c9c0788 Model: remove obsolete name methods 2024-11-06 15:43:13 +02:00
Ivan Krysak a67ba96644 Adopt name builder across the model users 2024-11-06 15:43:13 +02:00
Ivan Krysak 2a5d50630b Model: adopt name builder in verification 2024-11-06 15:43:13 +02:00
Ivan Krysak 2be6f4aebb TypeSystemPrinter: adopt name builder 2024-11-06 15:43:13 +02:00
Ivan Krysak ad868f57ad Model: introduce name builder 2024-11-06 15:43:13 +02:00
Ivan Krysak 0a3628e6fe Model: introduce naming configuration 2024-11-06 15:42:44 +02:00
Ivan Krysak 1eb80ecd2d Introduce an error creation helper 2024-11-06 15:20:37 +02:00
Ivan Krysak a0f4921e07 Minor improvements 2024-11-04 19:43:03 +02:00
Ivan Krysak a12f5d9e97 Minor improvements 2024-11-04 18:51:12 +02:00
Alessandro Di Federico 8cd4ee3b59 Move Kinds.h to revng 2024-11-04 15:09:56 +01:00
Alessandro Di Federico 98903f6b07 Move Ranks.h to revng 2024-11-04 15:09:56 +01:00
Alessandro Di Federico 4e670ac8e6 Either link revngcSupport or revngSupport 2024-11-04 15:09:56 +01:00
Alessandro Di Federico 253558ba63 Minor changes 2024-11-04 15:09:56 +01:00
Alessandro Di Federico 89f828c694 Link some revng libraries 2024-11-04 15:09:56 +01:00
Alessandro Di Federico 2e4f4d09b9 Remaining FunctionTags have been moved to revng 2024-11-04 15:09:56 +01:00
Alessandro Di Federico e239e18b0c Adopt FunctionPoolTag 2024-11-04 15:09:56 +01:00
Alessandro Di Federico 800340d6e8 IRHelpers.cpp has been moved to revng 2024-11-04 15:09:56 +01:00
Alessandro Di Federico 2ed940dc3a FunctionTags have been moved to revng 2024-11-04 15:09:56 +01:00
Alessandro Di Federico 36e2faad3d Introduce -Wunreachable-code-break 2024-10-31 17:19:55 +01:00
Alessandro Di Federico f9fad18cb4 EFA, Yield: handle blockless functions 2024-10-31 17:19:51 +01:00
Alessandro Di Federico 05881c242a revngSupport: use default set of LLVM libraries 2024-10-31 17:19:51 +01:00
Alessandro Di Federico 16e01f43d6 Import revng-c's FunctionTags.h 2024-10-31 17:19:51 +01:00
Alessandro Di Federico d72f6413f0 Import revng-c's Support/IRHelpers.h 2024-10-31 17:19:51 +01:00
Alessandro Di Federico c97438c5e4 DynamicHierarchy: ensure we call init last 2024-10-31 17:19:51 +01:00
Lauri Vasama 2d2fe890fb Add Clift expression operations 2024-10-31 08:41:25 +01:00
Lauri Vasama 4338607257 Add Clift operand type parser 2024-10-31 08:41:25 +01:00
Lauri Vasama eb20e745a3 Add Clift op type constraints 2024-10-31 08:41:25 +01:00
Lauri Vasama ecf4869473 Move CliftTypeHelpers.h functions to CliftType.h
Also added some new type functions.
2024-10-31 08:41:25 +01:00
Lauri Vasama 26adce6182 Add isLvalueExpression on ExpressionOpInterface 2024-10-31 08:41:25 +01:00
Lauri Vasama 7a0db383c5 A void-returning Clift function has a result 2024-10-31 08:41:25 +01:00
Lauri Vasama e1b55fd5c3 Add custom assembly format for Clift FunctionOp 2024-10-31 08:41:25 +01:00
Lauri Vasama 8e6adb5268 Add addConst and removeConst for ValueType 2024-10-31 08:41:25 +01:00