Commit Graph

334 Commits

Author SHA1 Message Date
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 6cdf6b9eda DebugInfo: do --verbose if logger is enabled
Enable running `fetch-debuginfo` in verbose mode if the logger is
enabled.
2025-03-13 18:03:50 +01:00
Alessandro Di Federico cac8b5d1b1 ELFImporter: search libs in the input directory 2025-03-05 09:57:51 +01:00
Alessandro Di Federico d4cd9beb77 Minor changes 2025-03-05 09:57:51 +01:00
Ivan Krysak 705e4a5955 auto [...] -> auto &&[...] 2025-02-13 13:10:51 +02:00
Ivan Krysak 08bd4ecca8 Model: introduce statement comment verification 2025-02-13 13:09:50 +02:00
Ivan Krysak 9564959871 Model: introduce statement comments 2025-02-13 13:09:50 +02:00
Ivan Krysak 6c43cebc90 Model: let VerifyHelper depend on NameBuilder 2025-02-13 13:09:50 +02:00
Ivan Krysak 288448f009 Never include model::VerifyHelper from headers 2025-02-13 13:09:50 +02:00
Alessandro Di Federico b523889742 DwarfImporter: try .debug before giving up
Also, improve logging.
2025-01-28 15:20:45 +01:00
Lauri Vasama 814e025ee2 Remove moves before return in NameBuilder.cpp 2025-01-02 11:25:32 +02:00
Alessandro Di Federico 276a4aa974 Generate model docs 2024-12-11 16:15:10 +01:00
Alessandro Di Federico 832840c307 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 15:22:10 +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 efcea8ae48 importBinary: fix error handling 2024-11-12 18:05:48 +01: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 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
Alessandro Di Federico 16e01f43d6 Import revng-c's FunctionTags.h 2024-10-31 17:19:51 +01:00
Alessandro Di Federico a0c670652c Improve usages of Expected<T> 2024-10-10 14:50:26 +02:00
Ivan Krysak 4bdc7f83b5 ABI: drop incomplete pascal support 2024-10-08 13:53:53 +02:00
Ivan Krysak 8c313a73af Model: make sure segments use generic addresses 2024-10-08 13:53:52 +02:00
Ivan Krysak 99e016f120 ABI: reorganize default ABI helpers 2024-10-08 13:53:52 +02:00
Giacomo Vercesi f8ffe38687 Unify cache directory logic
Make the cache directory logic uniform in Python and C++, move the
respective implementations under support since it's project-wide logic
and not exclusive to debug-info.
2024-10-01 13:38:13 +02:00
Alessandro Di Federico bc064244d6 s/deserialize/fromString/g 2024-09-27 12:07:17 +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 c8d4381297 s/Context &Ctx/Context &Context/g 2024-09-27 12:07:17 +02:00
Alessandro Di Federico bd08864e49 DwarfReader::readValue: handle DW_EH_PE_omit 2024-09-26 17:44:51 +02:00
Alessandro Di Federico 5c9b6ed9b3 Rename DILogger into Log 2024-08-16 13:27:00 +02:00
Alessandro Di Federico 09e483f96b BinaryImporter: create a Function for EntryPoint 2024-08-16 13:01:59 +02:00
Alessandro Di Federico cba1d6fa51 PDBImporter: fix .pdb path lookup 2024-08-16 13:01:57 +02:00
Alessandro Di Federico d3b945c6c2 PECOFFImporter: use Generic Segment::StartAddress 2024-08-05 18:00:27 +02:00
Alessandro Di Federico 7b00473859 PDBImporter: rework .pdb search 2024-08-05 17:41:34 +02:00
Alessandro Di Federico df8f4db512 MachOImporter: set DefaultABI 2024-07-09 08:58:51 +02:00
Alessandro Di Federico 1981f5a433 Minor changes 2024-07-09 08:58:51 +02:00
Ivan Krysak e52dd97937 TypeSystemPrinter: improve formatting
- change the font of the emitted graph to `Courier`, which is the only
  monospace font graphviz guarantees to support
- tweak color of the union definitions to be slightly lighter (so that
  it doesn't clash as much with the other colors used)
- change the color of all the "other" nodes (like typedef) from white
  to grey, so that they are visible on light backgrounds.
- leave a todo about `buildFieldName` being obsolete.
2024-06-27 11:05:52 +02:00
Ivan Krysak 4a2db0ba4f UpcastablePointer: streamline empty behavior 2024-06-27 11:05:52 +02:00
Ivan Krysak 2ae19ef30a DynamicFunction: ban / in the name 2024-06-27 11:05:51 +02:00
Ivan Krysak 3c974fea7c Model: make purge-invalid-types softer 2024-06-27 11:05:51 +02:00
Ivan Krysak 776a5cdc52 Model: move path data away from the header 2024-06-27 11:05:51 +02:00
Ivan Krysak dfa7478685 Adopt reworked model::Type 2024-06-27 11:05:51 +02:00
Ivan Krysak 925690a1e1 VerifyHelper: reduce pointer usage 2024-06-27 11:05:50 +02:00