Patchwork [07/55] Use common_val_print in f-valprint.c

login
register
mail settings
Submitter Tom Tromey
Date Dec. 8, 2019, 6:29 p.m.
Message ID <20191208182958.10181-8-tom@tromey.com>
Download mbox | patch
Permalink /patch/36598/
State New
Headers show

Comments

Tom Tromey - Dec. 8, 2019, 6:29 p.m.
This changes a couple spots in f-valprint.c to use common_val_print
rather than val_print.

gdb/ChangeLog
2019-12-08  Tom Tromey  <tom@tromey.com>

	* f-valprint.c (f77_print_array_1, f_val_print): Use
	common_val_print.

Change-Id: Ie5f834695005e32f01706abadabfdb45e70be076
---
 gdb/ChangeLog    |  5 +++++
 gdb/f-valprint.c | 11 +++--------
 2 files changed, 8 insertions(+), 8 deletions(-)

Patch

diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 35dc90dcb0f..10aeb7dc53d 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -156,10 +156,7 @@  f77_print_array_1 (int nss, int ndimensions, struct type *type,
 	{
 	  struct value *elt = value_subscript ((struct value *)val, i);
 
-	  val_print (value_type (elt),
-		     value_embedded_offset (elt),
-		     value_address (elt), stream, recurse,
-		     elt, options, current_language);
+	  common_val_print (elt, stream, recurse, options, current_language);
 
 	  if (i != upperbound)
 	    fprintf_filtered (stream, ", ");
@@ -345,10 +342,8 @@  f_val_print (struct type *type, int embedded_offset,
 		  fputs_filtered (" = ", stream);
 		}
 
-	      val_print (value_type (field),
-			 value_embedded_offset (field),
-			 value_address (field), stream, recurse + 1,
-			 field, options, current_language);
+	      common_val_print (field, stream, recurse + 1,
+				options, current_language);
 
 	      ++printed_field;
 	    }