for the definitions of the different possible levels. */
enum debug_info_level debug_info_level = DINFO_LEVEL_NONE;
-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
-/* Nonzero means can use our own extensions to DBX format.
- Relevant only when write_symbols == DBX_DEBUG or XCOFF_DEBUG. */
-int use_gdb_dbx_extensions = 0;
-#endif
+/* Nonzero means use GNU-only extensions in the generated symbolic
+ debugging information. */
+/* Currently, this only has an effect when write_symbols is set to
+ DBX_DEBUG, XCOFF_DEBUG, or DWARF_DEBUG. */
+int use_gnu_debug_info_extensions = 0;
/* Nonzero means do optimizations. -O.
Particular numeric values stand for particular amounts of optimization;
For plain -g, use system-specific default. */
if (write_symbols == DBX_DEBUG && !strncmp (str, "ggdb", len)
&& len >= 2)
- use_gdb_dbx_extensions = 1;
+ use_gnu_debug_info_extensions = 1;
else if (write_symbols == DBX_DEBUG && !strcmp (str, "gstabs+"))
- use_gdb_dbx_extensions = 1;
+ use_gnu_debug_info_extensions = 1;
else if (write_symbols == DBX_DEBUG
&& !strncmp (str, "gstabs", len) && len >= 2)
- use_gdb_dbx_extensions = 0;
+ use_gnu_debug_info_extensions = 0;
else
- use_gdb_dbx_extensions = DEFAULT_GDB_EXTENSIONS;
+ use_gnu_debug_info_extensions = DEFAULT_GDB_EXTENSIONS;
#endif /* DBX_DEBUGGING_INFO */
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols != NO_DEBUG)
;
+ else if (!strncmp (str, "g", len))
+ write_symbols = DWARF_DEBUG;
else if (!strncmp (str, "ggdb", len))
write_symbols = DWARF_DEBUG;
- /* For orthogonality. */
else if (!strncmp (str, "gdwarf", len))
write_symbols = DWARF_DEBUG;
+
+ /* Always enable extensions for -ggdb or -gdwarf+,
+ always disable for -gdwarf.
+ For plain -g, use system-specific default. */
+ if (write_symbols == DWARF_DEBUG && !strncmp (str, "ggdb", len)
+ && len >= 2)
+ use_gnu_debug_info_extensions = 1;
+ else if (write_symbols == DWARF_DEBUG && !strcmp (str, "gdwarf+"))
+ use_gnu_debug_info_extensions = 1;
+ else if (write_symbols == DWARF_DEBUG
+ && !strncmp (str, "gdwarf", len) && len >= 2)
+ use_gnu_debug_info_extensions = 0;
+ else
+ use_gnu_debug_info_extensions = DEFAULT_GDB_EXTENSIONS;
#endif
#ifdef SDB_DEBUGGING_INFO
if (write_symbols != NO_DEBUG)
;
- else if (!strncmp (str, "ggdb", len))
+ else if (!strncmp (str, "g", len))
+ write_symbols = SDB_DEBUG;
+ else if (!strncmp (str, "gdb", len))
write_symbols = SDB_DEBUG;
else if (!strncmp (str, "gcoff", len))
write_symbols = SDB_DEBUG;
#ifdef XCOFF_DEBUGGING_INFO
if (write_symbols != NO_DEBUG)
;
+ else if (!strncmp (str, "g", len))
+ write_symbols = XCOFF_DEBUG;
else if (!strncmp (str, "ggdb", len))
write_symbols = XCOFF_DEBUG;
else if (!strncmp (str, "gxcoff", len))
write_symbols = XCOFF_DEBUG;
- /* Always enable extensions for -ggdb,
+ /* Always enable extensions for -ggdb or -gxcoff+,
always disable for -gxcoff.
For plain -g, use system-specific default. */
if (write_symbols == XCOFF_DEBUG && !strncmp (str, "ggdb", len)
&& len >= 2)
- use_gdb_dbx_extensions = 1;
+ use_gnu_debug_info_extensions = 1;
+ else if (write_symbols == XCOFF_DEBUG && !strcmp (str, "gxcoff+"))
+ use_gnu_debug_info_extensions = 1;
else if (write_symbols == XCOFF_DEBUG
&& !strncmp (str, "gxcoff", len) && len >= 2)
- use_gdb_dbx_extensions = 0;
+ use_gnu_debug_info_extensions = 0;
else
- use_gdb_dbx_extensions = DEFAULT_GDB_EXTENSIONS;
+ use_gnu_debug_info_extensions = DEFAULT_GDB_EXTENSIONS;
#endif
if (write_symbols == NO_DEBUG)
warning ("`-%s' option not supported on this version of GCC", str);