Generate debug information in default version of DWARF format.
gdwarf-
-Common Driver Joined UInteger Var(dwarf_version) Init(5)
+Common Driver Joined UInteger Var(dwarf_version) Init(DWARF_VERSION_DEFAULT)
Generate debug information in DWARF v2 (or later) format.
gdwarf32
if (flag_pic > 0 && !TARGET_VXWORKS_RTP)
error ("PIC is only supported for RTPs");
- /* VxWorks comes with non-gdb debuggers which only support strict
- dwarf up to certain version. Default dwarf control to friendly
- values for these. */
-
+ /* VxWorks comes with non-gdb debuggers which only support strict dwarf
+ up to certain versions, as controlled by DWARF_VERSION_DEFAULT. */
if (!OPTION_SET_P (dwarf_strict))
dwarf_strict = 1;
-
- if (!OPTION_SET_P (dwarf_version))
- dwarf_version = VXWORKS_DWARF_VERSION_DEFAULT;
-
}
/* We don't want to use library symbol __clear_cache on SR0640. Avoid
vxworks_emit_call_builtin___clear_cache
extern void vxworks_emit_call_builtin___clear_cache (rtx begin, rtx end);
-/* Default dwarf control values, for non-gdb debuggers that come with
- VxWorks. */
+/* Default dwarf control values, accounting for non-gdb debuggers that come
+ with VxWorks. */
-#undef VXWORKS_DWARF_VERSION_DEFAULT
-#define VXWORKS_DWARF_VERSION_DEFAULT (TARGET_VXWORKS7 ? 4 : 2)
+#undef DWARF_VERSION_DEFAULT
+#define DWARF_VERSION_DEFAULT (TARGET_VXWORKS7 ? 4 : 2)
#undef DWARF_GNAT_ENCODINGS_DEFAULT
#define DWARF_GNAT_ENCODINGS_DEFAULT \
#define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB
#endif
+/* When generating dwarf info, the default standard version we'll honor
+ and advertise in absence of -gdwarf-<N> on the command line. */
+#ifndef DWARF_VERSION_DEFAULT
+#define DWARF_VERSION_DEFAULT 5
+#endif
+
#ifndef USED_FOR_TARGET
/* Done this way to keep gengtype happy. */
#if BITS_PER_UNIT == 8
terminate the stack backtrace. New ports should avoid this.
@end defmac
+@defmac DWARF_VERSION_DEFAULT
+A C expression whose value is the default dwarf standard version we'll honor
+and advertise when generating dwarf debug information, in absence of
+an explicit @option{-gdwarf-@var{version}} option on the command line.
+@end defmac
+
@deftypefn {Target Hook} void TARGET_DWARF_HANDLE_FRAME_UNSPEC (const char *@var{label}, rtx @var{pattern}, int @var{index})
This target hook allows the backend to emit frame-related insns that
contain UNSPECs or UNSPEC_VOLATILEs. The DWARF 2 call frame debugging
terminate the stack backtrace. New ports should avoid this.
@end defmac
+@defmac DWARF_VERSION_DEFAULT
+A C expression whose value is the default dwarf standard version we'll honor
+and advertise when generating dwarf debug information, in absence of
+an explicit @option{-gdwarf-@var{version}} option on the command line.
+@end defmac
+
@hook TARGET_DWARF_HANDLE_FRAME_UNSPEC
@hook TARGET_DWARF_POLY_INDETERMINATE_VALUE