This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Deprecate DBX/stabs?


[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
2017-07-21  Nathan Sidwell  <nathan@acm.org>

	* toplev.c (process_options): Warn about DBX being deprecated.

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
+  if (PREFERRED_DEBUGGING_TYPE == DBX_DEBUG
+      && write_symbols == DBX_DEBUG)
+    inform (UNKNOWN_LOCATION, "DBX (stabs) debugging is deprecated");
+#endif
+
   if (flag_dump_final_insns && !flag_syntax_only && !no_backend)
     {
       FILE *final_output = fopen (flag_dump_final_insns, "w");

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]