Commit Graph

184 Commits

Author SHA1 Message Date
Alessandro Di Federico b866e9010e ELFImporter: fix setting gp_mips canonical value
We used to set the canonical value of the MIPS gp register even in
absence of PLT, leading to a crash (specifically on archlinux librt.so).
2023-03-22 14:22:24 +01:00
Djordje Todorovic 956160e667 TypeCopier: Avoid copying the types twice 2023-03-22 11:38:12 +01:00
Alessandro Di Federico 92dd38c603 TypeCopier: copy PrimitiveTypes only when needed 2023-03-16 15:39:55 +01:00
Ivan Krysak 64856306c4 BinaryImporter: rework command line interface 2023-03-15 10:19:03 +01:00
Ivan Krysak 35956f46fe DwarfImporter: leave a note about static functions 2023-03-15 10:19:03 +01:00
Ivan Krysak 7c360eb8d1 PDBImporter: preserve x64 vector and clr ABIs 2023-03-15 10:19:03 +01:00
Ivan Krysak 34b532c754 BinaryImporter: always promote original name 2023-03-15 10:19:03 +01:00
Ivan Krysak 08b3764b23 BinaryImporter: prevent overlap in segment struct 2023-03-15 10:19:03 +01:00
Ivan Krysak 17c128c59b Make ABI depend on ModelPasses
Before now the dependency was the other way around
2023-03-15 10:19:03 +01:00
Ivan Krysak 4d21a88777 Model: remove an obsolete function conversion pass 2023-03-15 10:19:03 +01:00
Ivan Krysak b19572ea67 Model: Leave a note about the alignment 2023-03-15 10:19:02 +01:00
Ivan Krysak 84229d92b1 Model & ABI: make size and alignment stricter 2023-03-15 10:19:02 +01:00
Ivan Krysak 01a05e2037 ABI: separate convertions based on the direction 2023-03-15 10:19:02 +01:00
Ivan Krysak f5679262e9 DwarfImporter: prevent removal of valid arrays
The algorithm was looking for any array qualifier on a zero-sized
type, which led to some valid types being discarded in the case
when there was a pointer qualifier in-between.

`void a[100]` is not a valid type, while void *a[100]` is.
2023-03-15 10:19:02 +01:00
Ivan Krysak 726baf5318 Model: make Binary::recordNewType stricter 2023-03-15 10:19:02 +01:00
Ivan Krysak 3687869795 Model: make AddPrimitiveTypes a pure analysis 2023-03-15 10:19:01 +01:00
Ivan Krysak 11c0d7f02e Stop using \brief doxygen command 2023-03-15 10:19:01 +01:00
Ivan Krysak 0b1aaeaede Minor improvements 2023-03-15 10:19:01 +01:00
Alessandro Di Federico 8886792ebb Logger: ensure we consume llvm::Error 2023-02-23 14:51:03 +01:00
Djordje Todorovic 24a5705e12 Importer: Attach attributes when copying types 2023-02-16 11:07:52 +01:00
Massimo Fioravanti 4dc2e92782 Introduce DocumentError
`DocumentError`s are the inteded way of propagating errors from the
pipeline to the frontend when a location is required to inform the user
of the error whereabouts.
2023-02-09 13:42:50 +01:00
Antonio Frighetto ab36efca8d Model: import data objects in Segment.Type 2023-02-06 12:08:18 +01:00
Antonio Frighetto ea0a06a876 revng.daemon: accept no arguments for analysis
Let GraphQL accept zero or more parameters for analyses.
2023-02-06 09:37:23 +01:00
Pietro Fezzardi 04d877a992 TypeSystemPrint: fix print without stack type 2023-02-02 14:49:46 +01:00
Djordje Todorovic 8f95f14f12 CrossModelFindType: consider ExportedNames 2023-01-27 17:54:08 +01:00
Djordje Todorovic fec0ec7034 Model: add ExportedNames for local Functions 2023-01-27 17:54:06 +01:00
Djordje Todorovic 55d098b994 DwarfImporter: parse DW_AT_ranges 2023-01-27 17:54:03 +01:00
Djordje Todorovic 83905cf5ed Fix the level for FetchDebugInfo 2023-01-27 17:53:47 +01:00
Djordje Todorovic 3e75c09da0 dropTypesDependingOnTypes: purge from Function too
This commit ensure that, not only we drop `model::DynamicFunction`s
depending on an invalid type, but `model::Function`s are dropped too.
2023-01-27 17:48:19 +01:00
Djordje Todorovic 0f7c473cf3 FixModel: factor out logic of type deletion 2023-01-27 17:46:23 +01:00
Djordje Todorovic 5be245c971 FixModel: filter zero-sized fields 2023-01-27 17:46:21 +01:00
Djordje Todorovic e1b070f2da FixModel: filter out empty arrays 2023-01-27 17:46:18 +01:00
Djordje Todorovic 74c840a9f5 DwarfImporter: set prototype only if available 2022-12-13 11:27:23 +01:00
Djordje Todorovic 8976ab4126 DwarfImporter: handle DW_AT_noreturn 2022-12-13 11:27:16 +01:00
Djordje Todorovic 961f9e5461 Model: search debug info locally upon import
Also find prototypes in Models of dynamic libs for both PE and ELF.
2022-12-13 11:26:54 +01:00
Massimo Fioravanti 742e1a0c56 TupleTree: switch from public fields to accessors 2022-12-12 18:36:57 +01:00
Massimo Fioravanti 0d3133cfc9 Fix missing includes
This ensures headers make sense on their own, without implicit
assumption about includers to also include other headers before them.
2022-12-09 18:09:39 +01:00
Alessandro Di Federico 0245bf81d7 stringAsPath: externalize 2022-12-09 10:11:27 +01:00
Alessandro Di Federico 693b361e4a TupleTree: externalize several methods 2022-12-09 09:08:40 +01:00
Alessandro Di Federico de976fab13 Externalize ModelWrapper::get*Model 2022-12-09 09:07:16 +01:00
Alessandro Di Federico 446db0b62c Model type purge: do not purge primitives 2022-11-30 15:06:54 +01:00
Pietro Fezzardi df30792435 PrimitiveType: support for 80 and 96 bits types
This commit completes the support of various rare PrimitiveTypes, that
has been added opportunistically over time and has remained inconsistent
across the codebase:

- float80_t
- float96_t
- generic80_t
- generic96_t

The first two are necessary because on some platforms long double is
either 10 or 12 bytes wide.

The second two are necessary because the Generic PrimitiveType should
allow all non-zero byte sizes allowed by any other PrimitiveType.
2022-11-30 15:06:54 +01:00
Pietro Fezzardi 8bf90e8bfd QualifiedType::isScalar: true for model::EnumType 2022-11-30 15:06:54 +01:00
Alessandro Di Federico 580ac34bf8 DwarfImporter: set Architecture if Invalid 2022-11-30 15:06:54 +01:00
Ivan Krysak 207668070a QualifiedType: add argument-less isPrimitive() 2022-11-30 15:06:54 +01:00
Alessandro Di Federico b83edd61c0 DwarfImport: fix handling of local functions 2022-11-30 15:06:54 +01:00
Pietro Fezzardi fd0914b460 QualifiedType: add isConst method 2022-11-22 10:12:31 +01:00
Alessandro Di Federico 5a99154196 Put Python packages into lib/python*/site-packages 2022-10-11 19:08:10 +02:00
Pietro Fezzardi 43cb77e6a3 TypeSystemPrinter: route edge to the top of nodes 2022-10-06 17:53:47 +02:00
Massimo Fioravanti 9363bbd70a Pipeline: every container type has now a C++ type 2022-09-29 15:51:17 +02:00