]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add -gcodeview option
authorMark Harmstone <mark@harmstone.com>
Tue, 18 Apr 2023 19:55:35 +0000 (13:55 -0600)
committerJeff Law <jlaw@ventanamicro>
Tue, 18 Apr 2023 19:55:35 +0000 (13:55 -0600)
gcc/
* common.opt (gcodeview): Add new option.
* gcc.cc (driver_handle_option); Handle OPT_gcodeview.
* opts.cc (command_handle_option): Similarly.
* doc/invoke.texi: Add documentation for -gcodeview.

gcc/common.opt
gcc/doc/invoke.texi
gcc/gcc.cc
gcc/opts.cc

index 862c474d3c8fb14e044cfc92835b81f986d64218..a28ca13385a22f0b4f770257a76bdb86d8d317c6 100644 (file)
@@ -3318,6 +3318,10 @@ gas-locview-support
 Common Driver Var(dwarf2out_as_locview_support)
 Assume assembler support for view in (DWARF2+) .loc directives.
 
+gcodeview
+Common Driver JoinedOrMissing
+Generate debug information in CodeView format.
+
 gcoff
 Common Driver WarnRemoved
 Does nothing.  Preserved for backward compatibility.
index a38547f53e53563784fb85a3aa78ae44785955c0..aae6bc729dbd1f051b41264660d29708e38762aa 100644 (file)
@@ -509,6 +509,7 @@ Objective-C and Objective-C++ Dialects}.
 -gstrict-dwarf  -gno-strict-dwarf
 -gas-loc-support  -gno-as-loc-support
 -gas-locview-support  -gno-as-locview-support
+-gcodeview @gol
 -gcolumn-info  -gno-column-info  -gdwarf32  -gdwarf64
 -gstatement-frontiers  -gno-statement-frontiers
 -gvariable-location-views  -gno-variable-location-views
@@ -11328,6 +11329,12 @@ at file-scope or global-scope only.
 Produce debugging information in Alpha/VMS debug format (if that is
 supported).  This is the format used by DEBUG on Alpha/VMS systems.
 
+@item -gcodeview
+@opindex gcodeview
+Produce debugging information in CodeView debug format (if that is
+supported).  This is the format used by Microsoft Visual C++ on
+Windows.
+
 @item -g@var{level}
 @itemx -ggdb@var{level}
 @itemx -gvms@var{level}
index 16bb07f2cdc5edf0a25ce1bd221d417d6bc41d3c..39a44fa486da2a486256f045d29ade3878d81df5 100644 (file)
@@ -4572,6 +4572,10 @@ driver_handle_option (struct gcc_options *opts,
       do_save = false;
       break;
 
+    case OPT_gcodeview:
+      add_infile ("--pdb=", "*");
+      break;
+
     default:
       /* Various driver options need no special processing at this
         point, having been handled in a prescan above or being
index fb2e5388ab190975759e9ce1795938a0d67153b0..86b94d62b588ce58773ef592cbedac091d39bfb9 100644 (file)
@@ -3134,6 +3134,9 @@ common_handle_option (struct gcc_options *opts,
                        loc);
       break;
 
+    case OPT_gcodeview:
+      break;
+
     case OPT_gbtf:
       set_debug_level (BTF_DEBUG, false, arg, opts, opts_set, loc);
       /* set the debug level to level 2, but if already at level 3,