microsoft / WinDbg-Samples

Sample extensions, scripts, and API uses for WinDbg.
MIT License
702 stars 118 forks source link

Add support for bitfields and fix a number of other issues #91

Closed wmessmer-msft closed 10 months ago

wmessmer-msft commented 10 months ago

The main point of this change is to allow for improved import -- whether that is automatic import from PDBs (which fails with bitfields today) or, eventually, import from SDK headers.

There are a number of improvements here (mostly brought over from the "work in progress" header import branch). The most significant of these is the support for bitfields (both automatic and manual layout). Adding a field can now specify an automatic bitfield with types like "int:3" or a manual bitfield via a new "details" object based argument having .BitFieldPosition/.BitFieldLength.

Other changes included here:

Unit tests have been added for bitfields including automatic layout, manual layout, mixed layout, and layout flow with rearrangement of fields.