aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2codeview.h
diff options
context:
space:
mode:
authorMark Harmstone <mark@harmstone.com>2024-05-11 08:08:50 -0600
committerJeff Law <jlaw@ventanamicro.com>2024-05-11 08:15:01 -0600
commit36781ef8fd26eb9a0686957e7bac8f5ccc5ecc3f (patch)
tree5162e8e8fec0b8e35d5b37bf4ac2d72cd416bb48 /gcc/dwarf2codeview.h
parent1b0919cd147a2b6ccdee2b1217bf0200bdcc87aa (diff)
downloadgcc-36781ef8fd26eb9a0686957e7bac8f5ccc5ecc3f.zip
gcc-36781ef8fd26eb9a0686957e7bac8f5ccc5ecc3f.tar.gz
gcc-36781ef8fd26eb9a0686957e7bac8f5ccc5ecc3f.tar.bz2
[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.
Diffstat (limited to 'gcc/dwarf2codeview.h')
-rw-r--r--gcc/dwarf2codeview.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/dwarf2codeview.h b/gcc/dwarf2codeview.h
new file mode 100644
index 0000000..efda148
--- /dev/null
+++ b/gcc/dwarf2codeview.h
@@ -0,0 +1,30 @@
+/* dwarf2codeview.h - DWARF interface for CodeView generation.
+ Copyright (C) 2023 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef GCC_DWARF2CODEVIEW_H
+#define GCC_DWARF2CODEVIEW_H 1
+
+#include "dwarf2out.h"
+#include "flags.h"
+
+/* Debug Format Interface. Used in dwarf2out.cc. */
+
+extern void codeview_debug_finish (void);
+
+#endif /* GCC_DWARF2CODEVIEW_H */