[PATCH 2/4] Fortran, typeprint: Take level of details into account when printing elements of a structure.

Yao Qi qiyaoltc@gmail.com
Thu May 12 12:06:00 GMT 2016


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?

-- 
Yao (齐尧)



More information about the Gdb-patches mailing list