Alessandro Di Federico
6564fc0568
Minor changes
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
71f754f811
PDBImporter: declare our own FilterOptions
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
394111ed40
Add missing includes
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
dbcdad0a4d
Switch from llvm::Optional to std::optional
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
31b46de38c
Remove dead code and fix spurious warnings
...
Remove some dead code or introduce suppressions for spurious.
These are results of more accurate warnings in clang 16.
2023-04-08 08:42:23 +02:00
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
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
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
Antonio Frighetto
ab36efca8d
Model: import data objects in Segment.Type
2023-02-06 12:08:18 +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
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
580ac34bf8
DwarfImporter: set Architecture if Invalid
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
Massimo Fioravanti
9363bbd70a
Pipeline: every container type has now a C++ type
2022-09-29 15:51:17 +02:00
Ivan Krysak
247710648f
Minor changes
2022-09-26 10:33:43 +02:00
Djordje Todorovic
2abd250ae0
model: Skip nameless dyn functions in PE
2022-08-31 18:07:47 +02:00
Massimo Fioravanti
915c083661
Pipes: reorganize who defines pipes
2022-08-29 14:44:35 +02:00
Alessandro Di Federico
6a6cd939db
Rework EarlyFunctionAnalysis
2022-08-08 13:55:34 +02:00
Alessandro Di Federico
b07d134b73
Introduce CanonicalRegisterValues in the model
...
These canonical values ease certain analysis that can assume their value
at function entry.
2022-08-08 13:55:25 +02:00
Alessandro Di Federico
0566381ecf
ELFImporter: make importing more robust
2022-08-08 13:55:25 +02:00
Alessandro Di Federico
e0e8b4e5b6
ELFImporter.cpp: s/Log/ELFImporterLog/
2022-08-08 13:55:25 +02:00
Alessandro Di Federico
81c2a93add
Normalize FilePortion
2022-08-08 13:54:41 +02:00
Alessandro Di Federico
c2651f7218
importBinary: fail if no architecture is specified
2022-08-04 17:27:06 +02:00
Djordje Todorovic
46bc14bc73
Model: Add an opt for user defined paths of PDB
2022-07-28 14:52:50 +02:00
Djordje Todorovic
a36e22729f
Model: Add PDB support
2022-07-28 14:52:50 +02:00
Djordje Todorovic
9efb9cb55f
Model: Add parsing of delay dyn syms to PECOFF
...
This parses dedicated symbols similar to ELF's lazy linking.
2022-07-28 14:52:02 +02:00
Djordje Todorovic
b3cd1316f0
ELFImporter: Fix the documentation comment
2022-07-28 14:52:02 +02:00
Djordje Todorovic
098f864d8d
Model: Add parsing of dyn syms to PECOFFImporter
...
This parses symbols similar to ELF's .dynsym.
2022-07-28 14:52:02 +02:00
Djordje Todorovic
b79158bafc
Model: Add parseSymbols() to PECOFFImporter
...
This parses symbols similar to ELF's .symtab.
2022-07-28 14:52:02 +02:00
Djordje Todorovic
9d18d84f68
ELFImporter: Improve the parseSymbols()
...
This is an NFC.
2022-07-28 14:52:02 +02:00
Djordje Todorovic
5a72d968e5
Model: Add a method for parsing pe sections hdrs
...
This is an NFC.
2022-07-28 14:52:02 +02:00
Djordje Todorovic
8cbdcf278d
Model: Import PE when file size is > than virtual
...
Without this patch, the import part would fail with an assertion
even for a simple case since it doesn't expect that file size
could be larger than virtual.
From the microsoft documentation:
```
Because the SizeOfRawData field is rounded but the VirtualSize field
is not, it is possible for SizeOfRawData to be greater than
VirtualSize as well. When a section contains only uninitialized data,
this field should be zero.
```
We rather choose not to percolate this into the Model.
2022-07-28 14:52:02 +02:00
Djordje Todorovic
6d390af909
Model: Factor target-dep code out of ELFImporter
2022-07-28 14:51:40 +02:00