Deprecate DBX/stabs?
diff mbox

Message ID CAFiYyc1-o7Zf=XvNXo=1YzzQ+7=Vcm2=oPqWxRJFsvKYWc4o-w@mail.gmail.com
State New
Headers show

Commit Message

Richard Biener July 21, 2017, 1:16 p.m. UTC
On Fri, Jul 21, 2017 at 3:07 PM, Nathan Sidwell <nathan@acm.org> wrote:
> [darwin, cygwin, rx maintainers, you might have an opinion]
>
> On 07/21/2017 01:11 AM, Richard Biener wrote:
>>
>> On July 21, 2017 12:03:58 AM GMT+02:00, Jim Wilson <jim.wilson@linaro.org>
>> wrote:
>>>
>>> On Thu, Jul 20, 2017 at 2:00 PM, Nathan Sidwell <nathan@acm.org> wrote:
>>>>
>>>> With this patch the gdb stabs test results are still awful, but they
>>>
>>> are
>>>>
>>>> unchanged awfulness.
>>>
>>>
>>> Anyways, your new dbxout.c patch looks good.  And maybe we should
>>> think about deprecating the stabs support some day.
>>
>>
>> I've suggested that multiple times also to be able to get rid of the debug
>> hook interfacing in GCC and emit dwarf directly from FEs where that makes
>> sense.  DWARF should be a superset of other debug formats so it should be
>> possible to build stabs from dwarf.
>
>
> Let's at least deprecate it.  I attach a patch to do so.  With the patch,
> you'll get a note about dbx being deprecated whenever you use stabs
> debugging on a system that prefers stabs (thus both -g and -gstabs will
> warn).  On systems where stabs is not preferred, -gstabs will not give you a
> warning.  The patch survices an x86_64-linux bootstrap.
>
> A config can chose to override thus by defining 'DBX_DEBUG_OK' in the build
> defines.
>
> I did try build time CPP tricks, but config/rx.h and config/i386/darwin.h
> define it to be a conditional expression.
>
> AFAICT, the following include files are not used, and could probably be
> binned too:
> config/dbx.h
> config/dbxcoff.h
> config/dbxelf.h
> (+ configi386/gstabs.h Jim found)
>
> It looks like DBX is the default for:
> i386/cygming configured for 32-bit or lacking PE_SECREL32_RELOC
> i386/darwin.h for 32-bit target
> rx/rx.h when using AS100 syntax


> nathan
> --
> Nathan Sidwell

Patch
diff mbox

Index: toplev.c
===================================================================
--- toplev.c    (revision 250424)
+++ toplev.c    (working copy)
@@ -1413,6 +1413,12 @@  process_options (void)
        debug_info_level = DINFO_LEVEL_NONE;
     }

+#ifndef DBX_DEBBUG_OK
                        ^^^
typo?  The patch doesn't define this anywhere - I suggest to add it to
defaults.h
as 0 and use #if?  Also would need documenting if this is supposed to be a
target macro.

Thanks,
Richard.