[PATCH v2 1/4] Support for CodeView debugging format
commit36781ef8fd26eb9a0686957e7bac8f5ccc5ecc3f
authorMark Harmstone <mark@harmstone.com>
Sat, 11 May 2024 14:08:50 +0000 (11 08:08 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Sat, 11 May 2024 14:15:01 +0000 (11 08:15 -0600)
tree5162e8e8fec0b8e35d5b37bf4ac2d72cd416bb48
parent1b0919cd147a2b6ccdee2b1217bf0200bdcc87aa
[PATCH v2 1/4] Support for CodeView debugging format

This patch and the following add initial support for Microsoft's
CodeView debugging format, as used by MSVC, to mingw targets.

Note that you will need a recent version of binutils for this to be
useful. The best way to view the output is to run Microsoft's
cvdump.exe, found in their microsoft-pdb repo on GitHub, against the
object files.

gcc/

* Makefile.in (OBJS): Add dwarf2codeview.o.
(GTFILES): Add dwarf2codeview.cc
* config/i386/cygming.h (CODEVIEW_DEBUGGING_INFO): Define.
* dwarf2codeview.cc: New file.
* dwarf2codeview.h: New file.
* dwarf2out.cc: Include dwarf2codeview.h.
(dwarf2out_finish): Call codeview_debug_finish as needed.
* flag-types.h (DINFO_TYPE_CODEVIEW): Add enum member.
(CODEVIEW_DEBUG): Define.
* flags.h (codeview_debuginfo_p): Proottype.
* opts.cc (debug_type_names): Add codeview.
(debug_type_masks): Add CODEVIEW_DEBUG.
(df_set_names): Add codeview.
(codeview_debuginfo_p): New function.
(dwarf_based_debuginfo_p): Add CODEVIEW clause.
(set_debug_level): Handle CODEVIEW_DEBUG.
* toplev.cc (process_options): Handle codeview.

gcc/testsuite
* gcc.dg/debug/codeview/codeview-1.c: New test.
* gcc.dg/debug/codeview/codeview.exp: New testsuite driver.
gcc/Makefile.in
gcc/config/i386/cygming.h
gcc/dwarf2codeview.cc [new file with mode: 0644]
gcc/dwarf2codeview.h [new file with mode: 0644]
gcc/dwarf2out.cc
gcc/flag-types.h
gcc/flags.h
gcc/opts.cc
gcc/testsuite/gcc.dg/debug/codeview/codeview-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/debug/codeview/codeview.exp [new file with mode: 0644]
gcc/toplev.cc