This patch series adds support for outputting global variables when the -gcodeview option is provided, along with the type system to go along with this.
As with previous patches, the best way to see the output is run Microsoft's cvdump.exe against the object file: https://github.com/microsoft/microsoft-pdb/raw/master/cvdump/cvdump.exe You'll also need a recentish version of binutils in order to get ld to output an actual PDB file that can be read by MSVC or windbg. This ought to be fairly complete as far as C is concerned. Still to come are functions, local variables, and some C++ things. Mark Harmstone (11): Output CodeView data about variables Handle CodeView base types Handle typedefs for CodeView Handle pointers for CodeView Handle const and varible modifiers for CodeView Handle enums for CodeView Handle structs and classes for CodeView Handle unions for CodeView. Handle arrays for CodeView Handle bitfields for CodeView Handle subroutine types in CodeView gcc/dwarf2codeview.cc | 2278 ++++++++++++++++++++++++++++++++++++++++- gcc/dwarf2codeview.h | 67 ++ gcc/dwarf2out.cc | 5 + 3 files changed, 2341 insertions(+), 9 deletions(-) -- 2.44.2