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/4] Fortran, typeprint: Take level of details into account when printing elements of a structure.


On 12/05/2016 14:06, Yao Qi wrote:
Bernhard Heckel <bernhard.heckel@intel.com> writes:

-	  f_type_print_base (TYPE_FIELD_TYPE (type, index), stream, show,
-			     level + 4);
-	  fputs_filtered (" :: ", stream);
-	  fputs_filtered (TYPE_FIELD_NAME (type, index), stream);
-	  f_type_print_varspec_suffix (TYPE_FIELD_TYPE (type, index),
-				       stream, 0, 0, 0, 0);
  	  fputs_filtered ("\n", stream);
-	}
-      fprintfi_filtered (level, stream, "End Type ");
-      fputs_filtered (TYPE_TAG_NAME (type), stream);
+	  for (index = 0; index < TYPE_NFIELDS (type); index++)
+	    {
+	      f_type_print_base (TYPE_FIELD_TYPE (type, index), stream, show - 1,
+				 level + 4);
I read this patch again, and happen to see that we pass "show - 1" to
f_type_print_base instead of "show".  I think the change is correct, but
it shouldn't fall in this patch, right?

Yes, you are right. Show -1 should not go into this patch.
Thx


Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

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