[v2] Add -gcodeview option
Checks
Commit Message
Changed to double dashes as per
https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604287.html.
---
gcc/common.opt | 4 ++++
gcc/doc/invoke.texi | 7 +++++++
gcc/gcc.cc | 4 ++++
gcc/opts.cc | 3 +++
4 files changed, 18 insertions(+)
Comments
On 10/26/22 21:38, Mark Harmstone wrote:
> Changed to double dashes as per
> https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604287.html.
What value is there in providing this option now? IIUC we don't have
any of the bits yet to actually produce PDB records. It seems to me
like this ought to be patch 1/n of a patch to produce PDB debug symbols.
Or am I missing something?
jeff
On 20/11/22 16:43, Jeff Law wrote:
>
> On 10/26/22 21:38, Mark Harmstone wrote:
>> Changed to double dashes as per
>> https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604287.html.
>
> What value is there in providing this option now? IIUC we don't have any of the bits yet to actually produce PDB records. It seems to me like this ought to be patch 1/n of a patch to produce PDB debug symbols.
This isn't useless, as ld will create symbols for the mangled names even without the .debug$S and .debug$T sections being present.
On 11/20/22 09:54, Mark Harmstone wrote:
> On 20/11/22 16:43, Jeff Law wrote:
>>
>> On 10/26/22 21:38, Mark Harmstone wrote:
>>> Changed to double dashes as per
>>> https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604287.html.
>>
>> What value is there in providing this option now? IIUC we don't have
>> any of the bits yet to actually produce PDB records. It seems to me
>> like this ought to be patch 1/n of a patch to produce PDB debug symbols.
>
> This isn't useless, as ld will create symbols for the mangled names even
> without the .debug$S and .debug$T sections being present.
Sorry this didn't get resolved for gcc-13. The good news is I have
committed your V2 patch into the trunk for gcc-14.
Thanks for your patience,
jeff
On 4/18/23 15:57, Jeff Law via Gcc-patches wrote:
>
>
> On 11/20/22 09:54, Mark Harmstone wrote:
>> On 20/11/22 16:43, Jeff Law wrote:
>>>
>>> On 10/26/22 21:38, Mark Harmstone wrote:
>>>> Changed to double dashes as per
>>>> https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604287.html.
>>>
>>> What value is there in providing this option now? IIUC we don't have
>>> any of the bits yet to actually produce PDB records. It seems to me
>>> like this ought to be patch 1/n of a patch to produce PDB debug symbols.
>>
>> This isn't useless, as ld will create symbols for the mangled names
>> even without the .debug$S and .debug$T sections being present.
> Sorry this didn't get resolved for gcc-13. The good news is I have
> committed your V2 patch into the trunk for gcc-14.
FYI I've removed the stray obsolete @gol that broke building the docs.
Jason
On 4/18/23 14:32, Jason Merrill wrote:
> On 4/18/23 15:57, Jeff Law via Gcc-patches wrote:
>>
>>
>> On 11/20/22 09:54, Mark Harmstone wrote:
>>> On 20/11/22 16:43, Jeff Law wrote:
>>>>
>>>> On 10/26/22 21:38, Mark Harmstone wrote:
>>>>> Changed to double dashes as per
>>>>> https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604287.html.
>>>>
>>>> What value is there in providing this option now? IIUC we don't
>>>> have any of the bits yet to actually produce PDB records. It seems
>>>> to me like this ought to be patch 1/n of a patch to produce PDB
>>>> debug symbols.
>>>
>>> This isn't useless, as ld will create symbols for the mangled names
>>> even without the .debug$S and .debug$T sections being present.
>
>> Sorry this didn't get resolved for gcc-13. The good news is I have
>> committed your V2 patch into the trunk for gcc-14.
>
> FYI I've removed the stray obsolete @gol that broke building the docs.
Thanks. I didn't realize those were obsolete.
jeff
@@ -3253,6 +3253,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.
@@ -483,6 +483,7 @@ Objective-C and Objective-C++ Dialects}.
-gstabs -gstabs+ -gstrict-dwarf -gno-strict-dwarf @gol
-gas-loc-support -gno-as-loc-support @gol
-gas-locview-support -gno-as-locview-support @gol
+-gcodeview @gol
-gcolumn-info -gno-column-info -gdwarf32 -gdwarf64 @gol
-gstatement-frontiers -gno-statement-frontiers @gol
-gvariable-location-views -gno-variable-location-views @gol
@@ -10358,6 +10359,12 @@ assembler (GAS) to fail with an error.
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 -gstabs@var{level}
@@ -4608,6 +4608,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
@@ -3089,6 +3089,9 @@ common_handle_option (struct gcc_options *opts,
set_debug_level (NO_DEBUG, 2, arg, opts, opts_set, loc);
break;
+ case OPT_gcodeview:
+ break;
+
case OPT_gstabs:
case OPT_gstabs_:
set_debug_level (DBX_DEBUG, code == OPT_gstabs_, arg, opts, opts_set,