On 07/21/2017 09:16 AM, Richard Biener wrote:
On Fri, Jul 21, 2017 at 3:07 PM, Nathan Sidwell <nat...@acm.org> wrote:
+#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.
Like this? I've now included XCOFF, as it's a subset of DBX. Nothing appears to default to it.
nathan -- Nathan Sidwell
2017-07-21 Nathan Sidwell <nat...@acm.org> * defaults.h (DBX_DEBUG_DEPRECATED): New. * toplev.c (process_options): Warn about DBX/SDB being deprecated. * doc/tm.texi.in (DBX_DEBUG_DEPRECATED): Document. * doc/tm.texi: Updated. Index: defaults.h =================================================================== --- defaults.h (revision 250426) +++ defaults.h (working copy) @@ -889,6 +889,12 @@ see the files COPYING3 and COPYING.RUNTI #define SDB_DEBUGGING_INFO 0 #endif +/* DBX debugging is deprecated, and will generate a note if you + default to it. */ +#ifndef DBX_DEBUG_DEPRECATED +#define DBX_DEBUG_DEPRECATED 1 +#endif + /* If more than one debugging type is supported, you must define PREFERRED_DEBUGGING_TYPE to choose the default. */ Index: doc/tm.texi =================================================================== --- doc/tm.texi (revision 250426) +++ doc/tm.texi (working copy) @@ -9553,6 +9553,14 @@ user can always get a specific type of o @c prevent bad page break with this line These are specific options for DBX output. +DBX debug data is deprecated and is expected to be removed. + +@defmac DBX_DEBUG_DEPRECATED +Defined this macro to 1 if GCC should not warn about defaulting to DBX +or XCOFF debug output. This is intended to give maintainers notice of +deprecation, but not be unnecessarily invasive. Defining this macro is +a short-term measure. You need to plan for DBX's removal. +@end defmac @defmac DBX_DEBUGGING_INFO Define this macro if GCC should produce debugging output for DBX Index: doc/tm.texi.in =================================================================== --- doc/tm.texi.in (revision 250426) +++ doc/tm.texi.in (working copy) @@ -6842,6 +6842,14 @@ user can always get a specific type of o @c prevent bad page break with this line These are specific options for DBX output. +DBX debug data is deprecated and is expected to be removed. + +@defmac DBX_DEBUG_DEPRECATED +Defined this macro to 1 if GCC should not warn about defaulting to DBX +or XCOFF debug output. This is intended to give maintainers notice of +deprecation, but not be unnecessarily invasive. Defining this macro is +a short-term measure. You need to plan for DBX's removal. +@end defmac @defmac DBX_DEBUGGING_INFO Define this macro if GCC should produce debugging output for DBX Index: toplev.c =================================================================== --- toplev.c (revision 250426) +++ toplev.c (working copy) @@ -1413,6 +1413,12 @@ process_options (void) debug_info_level = DINFO_LEVEL_NONE; } + if (DBX_DEBUG_DEPRECATED + && write_symbols == PREFERRED_DEBUGGING_TYPE + && (PREFERRED_DEBUGGING_TYPE == DBX_DEBUG + || PREFERRED_DEBUGGING_TYPE == XCOFF_DEBUG)) + inform (UNKNOWN_LOCATION, "DBX/XCOFF (stabs) debugging is deprecated"); + if (flag_dump_final_insns && !flag_syntax_only && !no_backend) { FILE *final_output = fopen (flag_dump_final_insns, "w");