Current progress
I have a working branch that builds UVTD on Linux and generates member layouts, Sol bindings, and primary Itanium vtables from LLVM DWARF while preserving the existing Windows raw_pdb path; I have not opened a PR yet.
Context
The existing Windows UVTD code combines metadata extraction and generated-file emission in several places. To reuse the established output format from Linux, the current prototype makes the following targeted extractions:
Symbols.hpp
platform-neutral metadata types -> TypeMetadata.hpp
Windows Symbols/raw_pdb class -> remains in Symbols.hpp
MemberVarsDumper.cpp
PDB member extraction -> remains in MemberVarsDumper
generate_files() -> MemberVarsOutputGenerator
VTableDumper.cpp
PDB vtable extraction -> remains in VTableDumper
method-key helpers -> VTableMethodNames
generate_files()/cleanup -> VTableOutputGenerator
The resulting flow is:
Windows PDB reader --\
-> TypeContainer -> shared output generators
Linux DWARF reader --/
This keeps one implementation of the member, vtable, virtual-integration, and Sol output formats. It also makes the diff look larger because Git shows moved code as deletions from the original Windows files and additions to new shared files. For example, the Symbols class itself remains unchanged; only its platform-neutral data structures move out of the PDB-heavy header.
Questions
Which organization would you prefer for an eventual PR?
-
Keep the current shared pipeline: separate PDB and DWARF readers populate a common TypeContainer, followed by shared generators. This moves existing output code, but minimizes duplicated behavior and makes Windows/Linux output consistency testable.
-
Minimize movement in the existing Windows files and implement Linux-specific generation separately. This produces a smaller-looking diff, but duplicates member/vtable output and method-naming logic that could drift later.
-
Introduce a deeper reader abstraction and reorganize the source tree, for example:
UVTD/src/Metadata/Windows/
UVTD/src/Metadata/Linux/
UVTD/src/Generators/
This gives the clearest separation but would move considerably more existing code and seems contrary to a minimum-change PR.
More specifically:
- Is extracting the platform-neutral structures from
Symbols.hpp into a small shared header acceptable, or would you prefer keeping Symbols.hpp as the common type header with platform guards around the raw-PDB class?
- Is moving only
generate_files() out of MemberVarsDumper and VTableDumper the preferred boundary, or should the existing Windows classes remain completely untouched?
- Would you prefer new files to remain in the current flat
UVTD/include/UVTD and UVTD/src layout, or should platform readers and shared generators have subdirectories?
My preference is the first option because it keeps platform-specific code limited to metadata extraction while using the existing Windows emitter as the single source of truth, but I would like to align the code layout with maintainer expectations before cleaning the branch and opening a PR.
Current progress
I have a working branch that builds UVTD on Linux and generates member layouts, Sol bindings, and primary Itanium vtables from LLVM DWARF while preserving the existing Windows
raw_pdbpath; I have not opened a PR yet.Context
The existing Windows UVTD code combines metadata extraction and generated-file emission in several places. To reuse the established output format from Linux, the current prototype makes the following targeted extractions:
The resulting flow is:
This keeps one implementation of the member, vtable, virtual-integration, and Sol output formats. It also makes the diff look larger because Git shows moved code as deletions from the original Windows files and additions to new shared files. For example, the
Symbolsclass itself remains unchanged; only its platform-neutral data structures move out of the PDB-heavy header.Questions
Which organization would you prefer for an eventual PR?
Keep the current shared pipeline: separate PDB and DWARF readers populate a common
TypeContainer, followed by shared generators. This moves existing output code, but minimizes duplicated behavior and makes Windows/Linux output consistency testable.Minimize movement in the existing Windows files and implement Linux-specific generation separately. This produces a smaller-looking diff, but duplicates member/vtable output and method-naming logic that could drift later.
Introduce a deeper reader abstraction and reorganize the source tree, for example:
This gives the clearest separation but would move considerably more existing code and seems contrary to a minimum-change PR.
More specifically:
Symbols.hppinto a small shared header acceptable, or would you prefer keepingSymbols.hppas the common type header with platform guards around the raw-PDB class?generate_files()out ofMemberVarsDumperandVTableDumperthe preferred boundary, or should the existing Windows classes remain completely untouched?UVTD/include/UVTDandUVTD/srclayout, or should platform readers and shared generators have subdirectories?My preference is the first option because it keeps platform-specific code limited to metadata extraction while using the existing Windows emitter as the single source of truth, but I would like to align the code layout with maintainer expectations before cleaning the branch and opening a PR.