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.
This commit is contained in:
Pierre-Marie de Rodat 2015-04-24 16:13:19 +02:00
parent 9361e6307b
commit 8cd00c5973
2 changed files with 12 additions and 1 deletions

View File

@ -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

View File

@ -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;