+2017-11-22 Olivier Hainque <hainque@adacore.com>
+
+ * config/vxworks.c (vxworks_override_options): Pick default
+ dwarf version from macro value, VXWORKS_DWARF_VERSION_DEFAULT.
+ * config/vxworks.h: Define VXWORKS_DWARF_VERSION_DEFAULT and
+ DWARF_GNAT_ENCODINGS_DEFAULT.
+ * config/vxworksae.h: Likewise.
+
2017-11-22 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/83104
if (flag_pic && !TARGET_VXWORKS_RTP)
error ("PIC is only supported for RTPs");
- /* Default to strict dwarf-2 to prevent potential difficulties observed with
- non-gdb debuggers on extensions > 2. */
+ /* VxWorks comes with non-gdb debuggers which only support strict
+ dwarf up to certain version. Default dwarf control to friendly
+ values for these. */
+
if (!global_options_set.x_dwarf_strict)
dwarf_strict = 1;
if (!global_options_set.x_dwarf_version)
- dwarf_version = 2;
+ dwarf_version = VXWORKS_DWARF_VERSION_DEFAULT;
}
/* The diab linker does not handle .gnu_attribute sections. */
#undef HAVE_AS_GNU_ATTRIBUTE
+
+/* Default dwarf control values, for non-gdb debuggers that come with
+ VxWorks. */
+
+#undef VXWORKS_DWARF_VERSION_DEFAULT
+#define VXWORKS_DWARF_VERSION_DEFAULT (TARGET_VXWORKS7 ? 4 : 2)
+
+#undef DWARF_GNAT_ENCODINGS_DEFAULT
+#define DWARF_GNAT_ENCODINGS_DEFAULT \
+ (TARGET_VXWORKS7 ? DWARF_GNAT_ENCODINGS_MINIMAL : DWARF_GNAT_ENCODINGS_ALL)
#undef VXWORKS_OVERRIDE_OPTIONS
#define VXWORKS_OVERRIDE_OPTIONS vxworks_override_options ()
extern void vxworks_override_options (void);
+
+/* Default dwarf control values, for non-gdb debuggers that come with
+ VxWorks. */
+
+#undef VXWORKS_DWARF_VERSION_DEFAULT
+#define VXWORKS_DWARF_VERSION_DEFAULT 2
+
+#undef DWARF_GNAT_ENCODINGS_DEFAULT
+#define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_ALL