Commit Graph

16 Commits

Author SHA1 Message Date
Pietro Fezzardi 8d9f07d7a7 Change indentation of all decompiled C code
This commit changes the indentation of all the C code we emit, from 4
whitespaces to only 2 whitespaces.
2023-09-21 15:17:44 +02:00
Giacomo Vercesi 9223ada54f ImportModelFromCAnalysis: use TemporaryFile
Remove the usage of `createUniqueDirectory` that does not run cleanup on
crash/shutdown and instead use `TemporaryFile`.
2023-08-24 10:30:27 +02:00
Alessandro Di Federico f3d6bbb047 s/ThePTMLCBuilder/B/g 2023-08-23 16:40:54 +02:00
Alessandro Di Federico cc126f63b9 Adopt model::PrimitiveType::fromName 2023-08-23 16:37:39 +02:00
Alessandro Di Federico 4a9329ebdd s/getIncommingTypesForT/getIncomingTypesFor/ 2023-08-23 16:37:39 +02:00
Alessandro Di Federico 17bf31526a Drop Revng prefixes 2023-08-23 16:37:39 +02:00
Alessandro Di Federico eaed9c7302 HeaderToModel: s/DILogger/Log/ 2023-08-23 16:37:39 +02:00
Alessandro Di Federico 2b97576ebb HeaderToModel: do not hardcode clang paths 2023-08-23 16:37:39 +02:00
Alessandro Di Federico 100a27bb1c HeaderToModel: emit forward declaration later
We used to emit the forward declaration for the type we were editing
*before* `#pragma once`. This was not good per se, but it also lead to
failures due to the introduction of `_PACKED`, which is not yet defined
at that stage.
2023-08-23 16:37:39 +02:00
Alessandro Di Federico c623e2d9d6 HeaderToModel: fix a couple of std::optional bugs 2023-08-23 16:37:39 +02:00
Alessandro Di Federico 5ab0659966 HeaderToModel: change CustomName only if different
This commit fixes two problems with HeaderToModel: we no longer emit
fields for padding and do not change the name if it's identical to the
old `.name()`.

This issues led to create fields for padding and, in case the entity was
originally missing the `CustomName`, to set `CustomName`s to the
generated name.
2023-08-23 16:37:39 +02:00
Alessandro Di Federico f81e9d615b dumpModelToHeader: introduce struct for options
This commit also introduces a new option for emitting code right after
the `#include` section.
2023-08-23 16:37:39 +02:00
Alessandro Di Federico f406e978e3 Adopt progressive model::Type::IDs 2023-08-23 16:37:39 +02:00
Alessandro Di Federico a207ef7c44 Minor changes 2023-08-23 16:12:51 +02:00
Djordje Todorovic 1d3cacf6c2 HeaderToModel: support *80_t and *96_t primitives 2023-07-25 12:04:14 +02:00
Djordje Todorovic 5c0167f792 Add ImportModelFromC Analysis
This analysis will be used for the following features:

1) Edit Type in the Model
2) Edit Function Prototype in the Model
3) Add Type to the Model

It takes C code as an input, parses it and produces a Model
type that represents the C type.
2023-07-24 11:51:47 +02:00