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]

[PATCH 1/2] fixed indentation for printing Fortran types with pointers


From: Frank Penczek <frank.penczek@intel.com>

Printing the prefix "PTR TO -> (" resp. "REF TO ->(" ignored the
active indentation level. This caused inconsistent appearance of
user-defined Fortran types containing pointers. Fixed by using
"fprintfi_filtered" with the current indentation level for outputting
the prefix string.

Changelog:
	11/16/2012 Frank Penczek <frank.penczek@intel.com>

	* f-typeprint.c(f_type_print_base): use fprintfi_filtered to maintain
	  proper indentation when printing pointers/refs

Signed-off-by: Frank Penczek <frank.penczek@intel.com>
Change-Id: I5b9ef748720a5fd38e3f34027b27d8cf71034227
---
 gdb/f-typeprint.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
index aa33231..71fe869 100644
--- a/gdb/f-typeprint.c
+++ b/gdb/f-typeprint.c
@@ -290,12 +290,12 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
       break;
 
     case TYPE_CODE_PTR:
-      fprintf_filtered (stream, "PTR TO -> ( ");
+      fprintfi_filtered (level, stream, "PTR TO -> ( ");
       f_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
       break;
 
     case TYPE_CODE_REF:
-      fprintf_filtered (stream, "REF TO -> ( ");
+      fprintfi_filtered (level, stream, "REF TO -> ( ");
       f_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
       break;
 
-- 
1.7.0.7


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