aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/gdbtypes.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f518c6c..ff2e246 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2015-04-23 Patrick Palka <patrick@parcs.ath.cx>
* tui/tui-win.c (tui_async_resize_screen): Call
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 217ec70..103b4e2 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;