rizinorg / rizin

UNIX-like reverse engineering framework and command-line toolset.
https://rizin.re
GNU Lesser General Public License v3.0
2.72k stars 363 forks source link

Add proper bitfields support in RzType #1240

Open XVilka opened 3 years ago

XVilka commented 3 years ago

Currently RzBaseType doesn't consider bitfields for structures, unions, enums. It should be recognized and processed properly.

See also https://github.com/rizinorg/rizin/issues/314

Depends on https://github.com/tree-sitter/tree-sitter-c/issues/42

A good description on bitfields layout on ARM is here: https://www.keil.com/support/man/docs/armcc/armcc_chr1360774870320.htm

XVilka commented 3 years ago

There are some PDB changes required after added support for those

https://github.com/rizinorg/rizin/pull/1517/commits/45ca9441e1740b4d17e0d545d73f881e8ae7be3d See files:

Also add more tests in test/unit/test_pdb.c