This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] Fix PR gdb/15326 infinite recursion when printing Fortran types
- From: Tom Tromey <tromey at redhat dot com>
- To: Christoph Weinmann <christoph dot t dot weinmann at intel dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 24 Sep 2013 11:15:21 -0600
- Subject: Re: [PATCH 2/2] Fix PR gdb/15326 infinite recursion when printing Fortran types
- Authentication-results: sourceware.org; auth=none
- References: <1380031929-22345-1-git-send-email-christoph dot t dot weinmann at intel dot com> <1380031929-22345-3-git-send-email-christoph dot t dot weinmann at intel dot com>
>>>>> "Christoph" == Christoph Weinmann <christoph.t.weinmann@intel.com> writes:
Christoph> 2013-09-24 Frank Penczek <frank.penczek@intel.com>
Christoph> Christoph Weinmann <christoph.t.weinmann@intel.com>
Christoph> * f-typeprint.c (f_type_print_base): Include TYPE_TAG_NAME
Christoph> in conditional that ends recursive descend.
Christoph> testsuite/
Christoph> * gdb.fortran/type-with-ptr.f90: Add Fortran example
Christoph> to test recursion caused by pointers in user-defined types.
Christoph> * gdb.fortran/type-with-ptr.exp: Add test case for
Christoph> recursion.
Just a couple minor nits.
Christoph> + if (name_to_print == NULL)
Christoph> + name_to_print = TYPE_TAG_NAME (type);
The second line here is indented too far.
It should be in two spaces from the "if".
Christoph> +# Check for recursion when printing pointers in user-defined types
Christoph> +gdb_test "ptype tinsta" \
Christoph> + ".*\r\n *${int4} :: i\r\n *PTR TO \-\> \\( tuserdef :: ptr\\)\r\n.*" \
Christoph> + "Print only the type with pointer, not types pointed-to by the pointer."
Our Tcl style is to indent continuation lines by 4 spaces.
This patch is ok with those two little problems fixed.
Tom