Commit Graph

6044 Commits

Author SHA1 Message Date
Ivan Krysak ccb7c41e9e Introduce automatic names for dynamic functions 2025-04-24 12:00:21 +02:00
Ivan Krysak 0836143181 Bring name mangling out into a support helper 2025-04-24 12:00:14 +02:00
Giacomo Vercesi a2a7b4173d test_docs: remove useless global
The `verbose` was is not modified in the `log` function, so the use of
`global` is useless.
2025-04-23 14:13:03 +02:00
Giacomo Vercesi 0fd8ba794a extract-helper-names.sh: fix unquoted variable 2025-04-23 14:13:03 +02:00
Giacomo Vercesi d428eb597d Fix codespell errors
Fix erros detected by the new version of `codespell`.
2025-04-23 14:13:03 +02:00
Alessandro Di Federico eb794e499e Merge branch 'feature/no-more-original-names' 2025-04-17 17:29:19 +02:00
Ivan Krysak 79964eac74 Avoid ' misuse in error messages and comments 2025-04-17 16:41:21 +02:00
Ivan Krysak 83324fcf07 NameBuilder: improve documentation 2025-04-17 11:19:17 +03:00
Ivan Krysak c8de226f56 DwarfImporter: remove an input-dependent assert
Not checking for primitives there doesn't change anything anyway, as
`purge-invalid-types` model pass will clean anything invalid still
left after the importer.
2025-04-17 11:19:17 +03:00
Ivan Krysak ae3f19664a ModelPasses: introduce fix-model 2025-04-17 11:19:17 +03:00
Ivan Krysak 76ed261375 Use revng_undefined_ instead of init_
Current `init_` prefix used to set the default values of SCVs
is very common in typical code, hence it would cause a lot of
collisions.
2025-04-17 11:19:17 +03:00
Ivan Krysak 0c99d5d5fb IDBImporter: omit unnecessary typedefs 2025-04-17 11:19:17 +03:00
Ivan Krysak 2eed7f2410 IDBImporter: fix an incorrect type check 2025-04-17 11:19:17 +03:00
Ivan Krysak c6e38cd485 Return to using constant name builders
Because of how name builders used to lazy gather namespaces on the first
requested name, the objects were self mutating. As such only non-const
references could be used to pass them around.

Since that is no longer the case, this restores most of lost const
qualifiers.
2025-04-17 11:19:17 +03:00
Ivan Krysak 61f2c122b1 Canonicalize: adopt helper registry 2025-04-17 11:19:17 +03:00
Ivan Krysak 18829dc7e4 RestructureCFG: adopt helper registry 2025-04-17 11:19:17 +03:00
Ivan Krysak 8a8e0ce4ae PromoteStackPointer: adopt helper registry 2025-04-17 11:19:17 +03:00
Ivan Krysak 2c8e0d68c8 FunctionCallIdentification: adopt helper registry 2025-04-17 11:19:17 +03:00
Ivan Krysak 274e0f298a EFA: adopt helper registry 2025-04-17 11:19:17 +03:00
Ivan Krysak 5d0986c315 FunctionIsolation: adopt helper registry 2025-04-17 11:19:17 +03:00
Ivan Krysak e1c8c370f7 Lift: adopt helper registry 2025-04-17 11:19:17 +03:00
Ivan Krysak 0af6eaf494 BasicAnalyses: adopt helper registry 2025-04-17 11:19:17 +03:00
Ivan Krysak 514e6c56e0 ProgramCounterHandler: adopt helper registry 2025-04-17 11:19:17 +03:00
Ivan Krysak 48a7822923 FunctionTags: adopt helper registry 2025-04-17 11:19:17 +03:00
Ivan Krysak 24b96e4480 IRHelpers: introduce a const callers helper 2025-04-17 11:19:17 +03:00
Ivan Krysak 7b02ab0e44 getJTReasons: Work on const instructions 2025-04-17 11:19:17 +03:00
Ivan Krysak 76a2bffc94 Introduce an IR helper registry 2025-04-17 11:19:17 +03:00
Ivan Krysak 6a6b34b831 Introduce a general static registry helper 2025-04-17 11:19:17 +03:00
Ivan Krysak dc7d08555e Decompile: verify helper names are consistent 2025-04-17 11:19:17 +03:00
Ivan Krysak b72bcd7dd2 Introduce a basic problem name reporting system 2025-04-17 11:19:17 +03:00
Ivan Krysak aa15d8ca21 Standardize abort-like function usage 2025-04-17 11:19:17 +03:00
Ivan Krysak 154287b5d5 init_local_sp: drop leading _ 2025-04-17 11:19:17 +03:00
Ivan Krysak cdd9004feb StringLiteral: do not escape HTML in non-HTML mode 2025-04-17 11:19:17 +03:00
Ivan Krysak e96e64f035 CNameBuilder: ban known llvm intrinsic names 2025-04-17 11:19:17 +03:00
Ivan Krysak 29554ef303 CNameBuilder: ban known helper names 2025-04-17 11:19:17 +03:00
Ivan Krysak 80d8ac2b1d Introduce helper list collection 2025-04-17 11:19:17 +03:00
Ivan Krysak 57b5eb7f98 NameBuilder: allow different name checkers 2025-04-17 11:19:17 +03:00
Ivan Krysak 4cde1f614c support.h: mark unknown_pc as noreturn 2025-04-17 11:19:17 +03:00
Ivan Krysak e579da5f9d early-linked.c: use an uglier name for ignore 2025-04-17 11:19:17 +03:00
Ivan Krysak 47a1869695 tests: ensure architecture is always available 2025-04-17 11:19:17 +03:00
Ivan Krysak a3c8ced826 getUniqueString: use hash for empty strings 2025-04-17 11:19:17 +03:00
Ivan Krysak 93e44460bf ptml::CTypeBuilder: drop getPlainTypeName 2025-04-17 11:19:17 +03:00
Ivan Krysak 7d409ab4a7 KeyedObjectContainer: support llvm::StringRef 2025-04-17 11:19:17 +03:00
Ivan Krysak c4f071dfe3 Importers: adopt primitive typedef flattening 2025-04-17 11:19:17 +03:00
Ivan Krysak acb7d595ef Model: introduce a primitive typedef removal pass 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 c9ade8d458 NameBuilder: report reason when renaming something 2025-04-17 11:19:17 +03:00
Ivan Krysak 355d4f634c NameBuilder: prevent collisions with macros 2025-04-17 11:19:17 +03:00
Ivan Krysak 7b04cb99ae ptml::Annotations: introduce isMacro helper 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