Commit Graph

16 Commits

Author SHA1 Message Date
Ivan Krysak 0c99d5d5fb IDBImporter: omit unnecessary typedefs 2025-04-17 11:19:17 +03:00
Ivan Krysak 1383b0a40a Importers: replace .s in section names 2025-04-17 11:19:17 +03:00
Ivan Krysak 433af9ef6e Adopt the new name deduplication pass 2025-04-17 11:19:17 +03:00
Ivan Krysak f070f1f1e1 Model: sunset double name system 2025-04-17 11:19:17 +03:00
Ivan Krysak b72e2fd87b Model: allow omission of void size 2024-06-27 11:05:52 +02:00
Ivan Krysak dfa7478685 Adopt reworked model::Type 2024-06-27 11:05:51 +02:00
Ivan Krysak ac587cbb4f Model: rename Type into TypeDefinition 2024-06-27 11:05:48 +02:00
Ivan Krysak af6f9367b2 ImportPE: remove i386-specific values 2024-02-09 15:09:37 +00:00
Djordje Todorovic 79460c6933 PDBImport: Handle forward referenced types
A class or a struct type A can be a forward declaration and refer
to another type B in PDB, so we need to follow the references.
We pre-create type for B, when we face type A, and then, when we
visit type B, we populate the fields for the model::type we
pre-created.

In addition, this patch fixes some minor/side bugs:
  - Handle SHORT/Int16Short simple type
  - Do not delete model::Function if Prototype is invalid.
2024-02-09 15:09:37 +00:00
Alessandro Di Federico b34031f828 Import sections into segment's struct
Each model::Segment is associated to a model::StructType. Now we also
create sub-`structs` for sections, if available.
2024-02-08 16:57:40 +01:00
Pietro Fezzardi 48b27af795 Make Segment::Type a TupleTreeReference
This is homogeneous with all other nullable reference to types in the
model, like the StackFrameType in model::Function, and others.
2023-12-05 16:19:38 +01:00
Alessandro Di Federico 247879f7fc model::Type::ID: switch to progressive IDs
This commit switches `model::Type::ID` from being a GUID to be a
progressive number, in order to make things easier for humans.

On top of this, this commit introduces the following changes:

* TypeCopier: import all the necessary PrimitiveTypes and improve
  handling of CustomName.
* Move Kind as the last field of the key of each TupleTree type used in
  an `UpcastablePointer`.
* Update the ground truth of tests to ignore the `CustomName` in favor
  of focusing on `OriginalName`.
* Increase adoption of `model::Binary::makeType`, equivalent to
  `Binary.recordNewType(makeType<model::*Type>())`.
2023-08-23 16:14:04 +02:00
Antonio Frighetto 69e8615c9f Introduce test for Segment.Type importing 2023-02-06 12:08:18 +01:00
Djordje Todorovic 2e5a6dc167 model: add tests for import-idb 2022-09-21 18:39:22 +02:00
Djordje Todorovic ee686ef158 import-pe: Add more tests for type system 2022-07-28 15:04:26 +02:00
Djordje Todorovic d69020745d import-pe: Add tests 2022-07-28 15:02:49 +02:00