diff options
author | Pierre-Marie de Rodat <derodat@adacore.com> | 2015-04-24 16:13:19 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2015-04-24 16:14:17 +0200 |
commit | 8cd00c5973529c6f7ed42bc361ca05eb3672ab99 (patch) | |
tree | d8d509f2b54247b9d09aa9b14a6ea615f479800b /gdb/gdbtypes.c | |
parent | 9361e6307bd1cf4f8f7c9de5375719ede8caa0cb (diff) |
Fix printing for GNAT stuff for types that do not have descr. types
gdb/ChangeLog:
2015-04-24 Pierre-Marie de Rodat <derodat@adacore.com>
* gdbtypes.c (print_gnat_stuff): Do not recurse on the
descriptive type when there is none.
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r-- | gdb/gdbtypes.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 217ec7007e..103b4e22ea 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -3888,7 +3888,13 @@ print_gnat_stuff (struct type *type, int spaces) { struct type *descriptive_type = TYPE_DESCRIPTIVE_TYPE (type); - recursive_dump_type (descriptive_type, spaces + 2); + if (descriptive_type == NULL) + printfi_filtered (spaces + 2, "no descriptive type\n"); + else + { + printfi_filtered (spaces + 2, "descriptive type\n"); + recursive_dump_type (descriptive_type, spaces + 4); + } } static struct obstack dont_print_type_obstack; |