diff options
author | Joel Brobecker <brobecker@adacore.com> | 2014-01-16 15:08:16 +0400 |
---|---|---|
committer | Joel Brobecker <brobecker@adacore.com> | 2014-01-28 07:01:48 +0400 |
commit | c6044dd124bee08ce8ebd2909582f9aed53b5499 (patch) | |
tree | 4dd5d67541a49fd230c11b392ab3d3b664c0e7c4 /gdb/doc | |
parent | a83c8245aa76f176159431fdde8e488983877b51 (diff) | |
download | gdb-c6044dd124bee08ce8ebd2909582f9aed53b5499.zip gdb-c6044dd124bee08ce8ebd2909582f9aed53b5499.tar.gz gdb-c6044dd124bee08ce8ebd2909582f9aed53b5499.tar.bz2 |
New Ada maintenance command to ignore descriptive types (DWARF).
Currently, Ada debugging requires the use of certain GNAT-specific
encodings, which are generated by the compiler. These encodings
were created a long time ago to work around the fairly limited
capabilities of the stabs debugging format. With DWARF, the vast
majority of the encodings could be abandoned in favor of a pure
DWARF approach.
In order to make it easier to evaluate the quality of the DWARF
debugging information generated by the compiler, and how the debugger
handles it, we are introducing a small Ada-specific maintenance
setting which changes the debugger's behavior to ignore descriptive
types. Descriptive types are artificial types generated by the
compiler purely to give the debugger hints as to how to properly
decode certain properties of a type. For instance, for array
types, it generates a parallel type whose name is the name of
the array suffixed with ___XA, whose contents tells us what
the array's index type is, and possibly its bounds. See GCC's
gcc/ada/exp_dbug.ads for the full description of all encodings.
This is only a first step, as this setting does not deactivate
all encodings; More settings dedicated to each type of encoding
will likely be implemented in the future, as we make progress.
gdb/ChangeLog:
* 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.
gdb/doc/ChangeLog:
* gdb.texinfo (Ada Glitches): Document the new "maint ada set/show
ignore-descriptive-types". commands.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 31 |
2 files changed, 36 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 0ccad7e..7ccabc4 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index a990d2a..af14286 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -15712,6 +15712,37 @@ recommended to leave this setting to @code{on} unless necessary. @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 |