This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] Fix PR gdb/15326 infinite recursion when printing Fortran types


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]