Commit Graph

347 Commits

Author SHA1 Message Date
Kacper Kołodziej e7bb7d09df Rename getStrByAddress to getStringByAddress
We don't use abbreviations in names.
2023-04-04 09:30:09 +02:00
Pietro Fezzardi 4c2602e956 RawBinaryView: add getStrByAddress method
This method is similar to `getByAddress`, but it returns an
`llvm::StringRef`.

It is intended for those users that need to manipulate the bytes as
strings. In those cases, the `llvm::ArrayRef<uint8_t>` returned by
`getByAddress` is not suitable, because it triggers warnings due to
`uint8_t` not being the same as `char`.
2023-04-04 09:30:09 +02:00
Kacper Kołodziej 1b8801c9dc Add RawBinaryView::isReadOnly method
isReadOnly returns true if segment which contains region defined with
 MetaAddress and size is not writable.
2023-04-04 09:30:08 +02:00
Ivan Krysak 64856306c4 BinaryImporter: rework command line interface 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 ce0d39a9a6 Model: document model::Type::size() 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 769e5c1cbe ABI: add a natural alignment calculation helper 2023-03-15 10:19:02 +01:00
Ivan Krysak 75feff6186 model::Register: introduce isUsedInArchitecture 2023-03-15 10:19:02 +01:00
Ivan Krysak 058807ca00 model::Register: rename getArchitecture
The new name is `getReferenceArchitecture`
2023-03-15 10:19:02 +01:00
Ivan Krysak 9148f70b24 model::Register::getSize: leave a TODO 2023-03-15 10:19:02 +01:00
Ivan Krysak 7442bdc4a9 Model: introduce model::ABI::getPointerSize 2023-03-15 10:19:02 +01:00
Ivan Krysak c45b7778c1 Model: introduce copyMetadata and moveMetadata 2023-03-15 10:19:02 +01:00
Ivan Krysak 3c0c49c785 Model: add ABI::getRegisterArchitecture 2023-03-15 10:19:02 +01:00
Ivan Krysak 07837d9b9b Model: add model::Binary::recordNewTypes 2023-03-15 10:19:02 +01:00
Ivan Krysak b0e481cdef Model: add model::Binary::makeType 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
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 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
Djordje Todorovic fec0ec7034 Model: add ExportedNames for local Functions 2023-01-27 17:54:06 +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
Djordje Todorovic 98a8b8a7a9 Ban identifiers starting with reserved prefixes 2022-12-13 11:25:56 +01:00
Massimo Fioravanti 742e1a0c56 TupleTree: switch from public fields to accessors 2022-12-12 18:36:57 +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
Ivan Krysak 1f4b5dfd36 Model: associate a primitive kind to each register 2022-11-30 15:06:54 +01:00
Ivan Krysak 207668070a QualifiedType: add argument-less isPrimitive() 2022-11-30 15:06:54 +01:00
Ivan Krysak c3c3ed4381 Move pointer creation away from model::Binary 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
Pietro Fezzardi d520fd5aea Cache TTRs in Model tools 2022-10-29 16:46:19 +02:00
Pietro Fezzardi fff0fbd874 LoadModelPass: cache TTRs on getReadOnlyModel
The cache is evicted on the next call to getWritableModel.
2022-10-29 16:46:19 +02:00
Pietro Fezzardi 7eb94c6646 QualifiedType: add operator<=> 2022-10-29 16:46:19 +02:00
Massimo Fioravanti 9363bbd70a Pipeline: every container type has now a C++ type 2022-09-29 15:51:17 +02:00
Djordje Todorovic 5559d8431b Introduce fix-model model pass 2022-09-21 18:37:36 +02:00
Alvise de Faveri 999df25246 Add revng model export type-graph tool
This tools dumps a type, a function or an entire type-system to a
dot file,representing dependencies between types as edges.
2022-09-19 08:35:06 +02:00
Pietro Fezzardi ec9a5b0608 Use lexicographical compare for model::Qualifier 2022-09-19 08:34:20 +02:00
Giacomo Vercesi a05737696f Introduce revng/Model/ForwardDecls.h 2022-09-01 17:46:25 +02:00
Massimo Fioravanti 633f49c1ef Introduce dedicated namespace for kinds and ranks 2022-08-29 14:44:53 +02:00
Massimo Fioravanti 915c083661 Pipes: reorganize who defines pipes 2022-08-29 14:44:35 +02:00
Alessandro Di Federico 1d91ed9beb tuple_tree_generator: make C++ just a regular backend
The `tuple_tree_generator` component was still heavily treating C++ as a
special citizen.
This commit normalizes the situation.
2022-08-11 16:20:42 +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
Ivan Krysak 65d1a016d4 Standardize concept naming across the codebase 2022-08-05 17:27:56 +03:00
Ivan Krysak de99de78ae Add key overloads for model::getTypePath 2022-08-05 17:27:56 +03:00
Djordje Todorovic 1243d1061c Introduce revng model hard-purge
In addition, introduce a new model Pass:

  revng model opt -prune-unsused-types
2022-07-28 15:02:55 +02:00
Djordje Todorovic a36e22729f Model: Add PDB support 2022-07-28 14:52:50 +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