This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 1/2] fixed indentation for printing Fortran types with pointers
- From: Christoph Weinmann <christoph dot t dot weinmann at intel dot com>
- To: tromey at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 9 Sep 2013 11:00:23 +0200
- Subject: [PATCH 1/2] fixed indentation for printing Fortran types with pointers
- Authentication-results: sourceware.org; auth=none
- References: <1378717224-15247-1-git-send-email-christoph dot t dot weinmann at intel dot com>
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