+2014-01-28 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c (maint_set_ada_cmdlist, maint_show_ada_cmdlist):
+ New static globals.
+ (maint_set_ada_cmd, maint_show_ada_cmd): New functions.
+ (ada_ignore_descriptive_types_p): New static global.
+ (find_parallel_type_by_descriptive_type): Return immediately
+ if ada_ignore_descriptive_types_p is set.
+ (_initialize_ada_language): Register new commands "maintenance
+ set ada", "maintenance show ada", "maintenance set ada
+ ignore-descriptive-types" and "maintenance show ada
+ ignore-descriptive-types".
+ * NEWS: Add entry for new "maint ada set/show
+ ignore-descriptive-types" commands.
+
2014-01-27 Markus Metzger <markus.t.metzger@intel.com>
* record-btrace.c (record_btrace_close): Call btrace_teardown
*** Changes since GDB 7.7
+* New options
+
+maint ada set ignore-descriptive-types (on|off)
+maint ada show ignore-descriptive-types
+ Control whether the debugger should ignore descriptive types in Ada
+ programs. The default is not to ignore the descriptive types. See
+ the user manual for more details on descriptive types and the intended
+ usage of this option.
+
* New features in the GDB remote stub, GDBserver
** New option --debug-format=option1[,option2,...] allows one to add
/* Space for allocating results of ada_lookup_symbol_list. */
static struct obstack symbol_list_obstack;
+/* Maintenance-related settings for this module. */
+
+static struct cmd_list_element *maint_set_ada_cmdlist;
+static struct cmd_list_element *maint_show_ada_cmdlist;
+
+/* Implement the "maintenance set ada" (prefix) command. */
+
+static void
+maint_set_ada_cmd (char *args, int from_tty)
+{
+ help_list (maint_set_ada_cmdlist, "maintenance set ada ", -1, gdb_stdout);
+}
+
+/* Implement the "maintenance show ada" (prefix) command. */
+
+static void
+maint_show_ada_cmd (char *args, int from_tty)
+{
+ cmd_show_list (maint_show_ada_cmdlist, from_tty, "");
+}
+
+/* The "maintenance ada set/show ignore-descriptive-type" value. */
+
+static int ada_ignore_descriptive_types_p = 0;
+
/* Inferior-specific data. */
/* Per-inferior data for this module. */
{
struct type *result;
+ if (ada_ignore_descriptive_types_p)
+ return NULL;
+
/* If there no descriptive-type info, then there is no parallel type
to be found. */
if (!HAVE_GNAT_AUX_INFO (type))
If a regular expression is passed as an argument, only those matching\n\
the regular expression are listed."));
+ add_prefix_cmd ("ada", class_maintenance, maint_set_ada_cmd,
+ _("Set Ada maintenance-related variables."),
+ &maint_set_ada_cmdlist, "maintenance set ada ",
+ 0/*allow-unknown*/, &maintenance_set_cmdlist);
+
+ add_prefix_cmd ("ada", class_maintenance, maint_show_ada_cmd,
+ _("Show Ada maintenance-related variables"),
+ &maint_show_ada_cmdlist, "maintenance show ada ",
+ 0/*allow-unknown*/, &maintenance_show_cmdlist);
+
+ add_setshow_boolean_cmd
+ ("ignore-descriptive-types", class_maintenance,
+ &ada_ignore_descriptive_types_p,
+ _("Set whether descriptive types generated by GNAT should be ignored."),
+ _("Show whether descriptive types generated by GNAT should be ignored."),
+ _("\
+When enabled, the debugger will stop using the DW_AT_GNAT_descriptive_type\n\
+DWARF attribute."),
+ NULL, NULL, &maint_set_ada_cmdlist, &maint_show_ada_cmdlist);
+
obstack_init (&symbol_list_obstack);
decoded_names_store = htab_create_alloc
+2014-01-28 Joel Brobecker <brobecker@adacore.com>
+
+ * gdb.texinfo (Ada Glitches): Document the new "maint ada set/show
+ ignore-descriptive-types". commands.
+
2014-01-22 Doug Evans <dje@google.com>
* gdb.texinfo (Server): Mention --debug-format=all|none|timestamp.
@end table
+@cindex GNAT descriptive types
+@cindex GNAT encoding
+Internally, the debugger also relies on the compiler following a number
+of conventions known as the @samp{GNAT Encoding}, all documented in
+@file{gcc/ada/exp_dbug.ads} in the GCC sources. This encoding describes
+how the debugging information should be generated for certain types.
+In particular, this convention makes use of @dfn{descriptive types},
+which are artificial types generated purely to help the debugger.
+
+These encodings were defined at a time when the debugging information
+format used was not powerful enough to describe some of the more complex
+types available in Ada. Since DWARF allows us to express nearly all
+Ada features, the long-term goal is to slowly replace these descriptive
+types by their pure DWARF equivalent. To facilitate that transition,
+a new maintenance option is available to force the debugger to ignore
+those descriptive types. It allows the user to quickly evaluate how
+well @value{GDBN} works without them.
+
+@table @code
+
+@kindex maint ada set ignore-descriptive-types
+@item maintenance ada set ignore-descriptive-types [on|off]
+Control whether the debugger should ignore descriptive types.
+The default is not to ignore descriptives types (@code{off}).
+
+@kindex maint ada show ignore-descriptive-types
+@item maintenance ada show ignore-descriptive-types
+Show if descriptive types are ignored by @value{GDBN}.
+
+@end table
+
@node Unsupported Languages
@section Unsupported Languages