Alessandro Di Federico
ee24e445e7
tmp
2026-04-24 11:19:59 +02:00
claudietto
86e23b46a7
PDBImporter: only require size-availability for preregistered definitions
...
The end-of-run check aborted whenever any ProcessedTypes entry was still
IsSizeAvailable=false, but Modifier/BitField wrappers resolved only
behind pointer paths (NeedsSize=false) legitimately stay
IsSizeAvailable=false. Restrict the check to entries whose Definition is
set — matching the original UnprocessedTypeDefinitions semantics.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-24 10:00:43 +02:00
claudietto
eb1f247cdc
PDBImporter: fix cast crash when a preregistered type is UDT-typedef'd
...
handle<RecordType, DefinitionType> used Entry.Type->skipToDefinition() to
find the definition to populate, but when recordType wraps the entry in
a synthesized TypedefDefinition (because a matching UDTSym exists),
skipToDefinition returns the outer TypedefDefinition and the cast to
Struct/Union/Enum/CABIFunctionDefinition aborts. Track the preregistered
inner definition on the Entry and dispatch on it directly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-24 10:00:29 +02:00
Alessandro Di Federico
35bf82f1cc
mv CrossModelFindTypeHelper.h FindMissingTypes.h
2026-04-23 13:40:43 +02:00
Alessandro Di Federico
7dce356df3
Uniform Binary::get{Definition,Binary}Reference
2026-04-23 13:40:43 +02:00
Alessandro Di Federico
ee3bb0dfb0
Introduce ImportPrototypesFromDatabase
...
This commit introduces an analysis to import prototypes from a SQLite
database of well-known prototypes, typically built from debug info of
operating systems.
This analysis supersedes import-well-known-models.
2026-04-23 13:40:43 +02:00
Alessandro Di Federico
09dfccec91
Implement platform roots support
...
Refactor the binary import and dependency resolution infrastructure to
support multiple platforms (Linux, Windows, macOS) via a
configuration-driven root system.
Major changes:
* Overhaul PDB and DWARF importers for platform-aware debug info
loading.
* Refactor LDDTree into a template-based architecture with
platform-specific implementations (ELF, PE/COFF).
* Mostly rewrite the PDB importer, which had significant limitations.
2026-04-23 13:40:43 +02:00
Alessandro Di Federico
36a1295a8f
Introduce Binary.getIdentifierBinaryReference
2026-04-23 13:40:43 +02:00
Alessandro Di Federico
eb9e82477a
Introduce WindowsApiSetSchemaParser
2026-04-23 13:40:43 +02:00
Alessandro Di Federico
f1ab2f7544
Introduce getConfigDirectory
2026-04-23 13:40:43 +02:00
Alessandro Di Federico
0385e4c652
Introduce revng::Configuration
2026-04-23 13:40:43 +02:00
Alessandro Di Federico
5b43a23060
BinaryIdentifier: s/.Name/.CanonicalPath/g
2026-04-23 13:40:42 +02:00
Alessandro Di Federico
7b3a80155e
Model: introduce OperatingSystem and PlatformName
...
These are going to be used to select the correct root.
2026-04-23 13:40:42 +02:00
Alessandro Di Federico
80657806da
Introduce findPathCaseInsensitive
2026-04-23 13:40:42 +02:00
Alessandro Di Federico
ee9c77b719
appendTo: move to STLExtras.h
2026-04-23 13:40:42 +02:00
Alessandro Di Federico
58ab09b107
findFileInPaths: do not abort on missing file
2026-04-23 13:40:42 +02:00
Alessandro Di Federico
934e2a92f5
Make argv non-const char *
2026-04-23 13:40:42 +02:00
Alessandro Di Federico
6a3a0489a7
Logger::unindent: fix assertion
2026-04-23 13:40:41 +02:00
Alessandro Di Federico
8bc37d9c8f
HelperArgumentsAnalysis: use specific Logger name
...
Using `Log` as a non-`static` global variable name lead to subtle
linking issues.
2026-04-23 13:40:41 +02:00
Alessandro Di Federico
9cd2bffcb4
s/Endianess/Endianess/g
2026-04-23 13:40:41 +02:00
Alessandro Di Federico
7049f61baa
Minor changes
2026-04-23 13:40:41 +02:00
Ivan Krysak
71845dcbbb
CliftEmitC: stop using mlir::clift namespace
2026-04-22 08:19:47 +00:00
Ivan Krysak
f13748583b
verifyAgainstModel: check forbidden attributes
2026-04-22 08:19:35 +00:00
Ivan Krysak
8387f8ce17
verifyAgainstModel: check for unknown attributes
2026-04-22 08:19:34 +00:00
Ivan Krysak
e4770db1f1
verifyAgainstModel: function type attributes
2026-04-22 08:19:34 +00:00
Ivan Krysak
52f41c4c44
verifyAgainstModel: check struct attributes
2026-04-22 08:19:33 +00:00
Ivan Krysak
d66c54321c
verifyAgainstModel: check function attributes
2026-04-22 08:19:32 +00:00
Ivan Krysak
9675b2d3c9
verifyAgainstModel: greatly improve RFT checks
2026-04-22 08:19:32 +00:00
Ivan Krysak
5f511d8e17
verify-against-model: split into two
...
The resulting pipes are:
1. binary-granularity one with the name unchanged
2. function-granularity one called `verify-function-against-model`.
2026-04-22 08:19:30 +00:00
Ivan Krysak
e693cdbd53
model-verify-clift -> verify-against-model
2026-04-22 08:19:30 +00:00
Ivan Krysak
ce7e5a3917
CliftModelVerify: improve error message wording
2026-04-22 08:19:30 +00:00
Ivan Krysak
40a5c76e81
CliftModelVerify: factor error creation out
...
This heavily improves readability of the messages themselves.
2026-04-22 08:19:29 +00:00
Ivan Krysak
b46c54308a
Remove unused logic that slipped through
2026-04-22 08:19:29 +00:00
Ivan Krysak
3de5b009e7
Clift: introduce simple passes for header tests
2026-04-22 08:19:29 +00:00
Ivan Krysak
681df85f5d
EmitCPass: separate boilerplate for easier reuse
2026-04-22 08:19:28 +00:00
Ivan Krysak
d9acaadfac
CBackendPass.cpp -> CEmissionPasses.cpp
2026-04-22 08:19:28 +00:00
Ivan Krysak
7edc4b3da6
CEmitter: emit function type attributes
2026-04-22 08:19:28 +00:00
Ivan Krysak
481f8dba31
CEmitter: emit function comment with prototype
2026-04-22 08:19:27 +00:00
Ivan Krysak
74fa16dd13
Introduce helper header emitter
2026-04-22 08:19:25 +00:00
Ivan Krysak
7ab3d590e0
Introduce type and global header emitter
2026-04-22 08:18:52 +00:00
Ivan Krysak
405eebcbd1
TypeDefinitionEmitter: emit comments
2026-04-22 06:33:56 +00:00
Ivan Krysak
3bd8879948
CEmitter: Introduce doxygen emission helpers
2026-04-22 06:33:56 +00:00
Ivan Krysak
d3e22a2b05
CTokenEmitter: add #pragma once helper
2026-04-22 06:33:56 +00:00
Ivan Krysak
6d76908858
Introduce TypeDefinitionEmitter
2026-04-22 06:33:38 +00:00
Ivan Krysak
d327cd3be5
emitCAttributes: introduce an array overload
2026-04-22 06:14:52 +00:00
Ivan Krysak
c3b870beee
CEmitter: make function prototype commentable
...
This wraps pieces of it (arguments and return value) into a commentable
region showing the UI where to direct the `"comment"` action.
2026-04-22 06:14:52 +00:00
Ivan Krysak
3e63412e8c
CEmitter: make return value scope
...
This commit should be viewed in conjunction with the following one,
separating white-space only changes makes the next commit less noisy.
2026-04-22 06:14:52 +00:00
Ivan Krysak
f69a0345b7
CTokenEmitter: introduce Commentable region
2026-04-22 06:14:52 +00:00
Ivan Krysak
9167153303
Only allow unit attributes on function operations
2026-04-22 06:14:52 +00:00
Ivan Krysak
58cff91c3b
CTokenEmitter: allow identifiers in comments
2026-04-22 06:14:52 +00:00