Releases: Abathargh/stropt
Release list
v0.4.0
This is a big release, with big changes to the core of the project which enable some pretty powerful things.
New Features
The main feature for this release is typedef support, together with a huge rework of the type and name extraction algorithm from the parsed C source.
Typedef support
-
Make it so that typedef'd names for aggregates are visible to the tool - e.g.
stropt "test_t" "typedef struct { char a; } test_t; }" works- typedef support for structs
- typedef support for unions
- typedef support for enums
- as aggregates
- as sub-aggregates/fields
-
Support both
struct exampleandexamplefor non typedef types or for pre-typedef defs in typedef types -
Add test cases for everything above
-
Add test cases for complex scenarios
- Array of structs
- Array with size defined with
#define - Add test cases for
GetAggregateName(before the rest since it's used in current parse tests)
-
Use
cc.Translatefromcznic/ccinstead ofcc.Parse- Finish reworking everything using
ast.TranslationUnitfor type information - Remove old code and make it work with the rest of the pipeline
- Add docs for parsing rework
- Add docs to extract.go
- Refactor stropt.go and add more comments in printing to screen funcs
- Add docs for enums
- Make it work somehow without c compiler, since Translate forces a C
compiler to be there (check examples in cc repo)
- Finish reworking everything using
Other additions
-
Support constant arithmetic expressions in arrays
- Additive and multiplicative expressions
- Parentheses expressions
- Support
sizeofexpressions - Support any combination of the above
-
Add a
stdint.hhardcoded source file so that users do not have to use a compiler just for width-precise type- Using
-use-compilerignores this header file.
- Using
-
Update go version so the tool includes proper version numbers based on git tag
Fixes and QoL
- Don't print layout for enums, print it with padding only for last one for unions
- Fix union padding algorithm (wrong maximum size/alignment computation)
- When using bare + optimize, don't print aggregates
- Fix a bug where passing more than one width/align flags would only take in the first one and ignore the rest
- Fix a bug where passing an union under analysis prints just one field
v0.3.0
New Features
- the tool now understands and knows hot to handle
enums, both for definitions and as fields in aggregates. - adding a
-enumargument to pass the enum size/alignment, defaulting to4,4.
Fixes and QoL
- fixed a bug where using avr mode activated the optimizer by mistake.
Attached to this release, you can find pre-compiled binaries for v0.3.0 of stropt.
v0.2.0
New Features
- stropt does not need a compiler installed on the machine anymore, if not using include directives
-32bitmode and-avrmode, which set widths and alignments for base types automatically.- build facilities
Fixes and QoL
- More test coverace
Attached to this release, you can find pre-compiled binaries for v0.2.0 of stropt.