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.
This Oython tool will be used to easily work with PTML.
It currently features two subcommands:
* `cat` prints a PTML to the terminal, with color formatting if
possible;
* `strip` will strip a file of the PTML markup;
The `ptml` namespace contains utilities for easier PTML manipulation.
These include:
* A few constants (e.g. standard attributes) available in
`revng/PTML/Constants.h`
* The `Tag` class to easily construct html/xml tags with attributes
without having to use format strings.
* The `PTMLIndentedOstream`, a llvm::raw_ostream wrapper that
automatically adds tagged indentation to the output
Non-composite keys are single-element tuples, therefore they don't
directly inherit the YAML serialization of their only element.
This commit enables building `ScalarTraits` for keys in all cases.
`Segment` now includes a `Type` of struct kind. This is intended to
emit the segment as a struct later in decompilation. The implementation
of name has also been added.
revng.model.__init__ would dynamically import the latest version of
the model when imported, however this would break IDE hints as the
classes would not be properly detected. Instead we now manually
specify the last version in the __init__.py file.
Add a specialized list class to be used in the model. This will do
runtime instance checking to make sure that list-like fields in the
model only contain object of the correct type.
Fix the constructor for required sequence fields, now they use a
`default_factory` with `list` to construct an empty list when none is
passed to the constructor.
Implement a constructor override for model classes that checks that the
constructor does not have positional arguments passed to it. This can
be dropped post-3.10 since it is implemented natively by kw_only.
A step's artifacts now include singleTargetFilename, which gives a
suggested filename to use when a single element is extracted from the
underlying container.