2017-07-21 Nathan Sidwell <nathan@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.
===================================================================
@@ -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. */
===================================================================
@@ -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
===================================================================
@@ -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
===================================================================
@@ -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");