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]

[commit/Ada 03/11] ada_val_print_1: Go through val_print instead of recursive call to self.


This is to standardize a little bit how printing is done, and in
particular make sure that everyone goes through val_print when
printing sub-objects.  This helps making sure that standard features
handled by val_print get activated when expected.

gdb/ChangeLog:

        * ada-valprint.c (ada_val_print_1): Replace calls to
        ada_val_print_1 by calls to val_print.
---
 gdb/ChangeLog      |  5 +++++
 gdb/ada-valprint.c | 23 +++++++++--------------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2866cae..ee0df63 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2014-01-07  Joel Brobecker  <brobecker@adacore.com>
 
+	* ada-valprint.c (ada_val_print_1): Replace calls to
+	ada_val_print_1 by calls to val_print.
+
+2014-01-07  Joel Brobecker  <brobecker@adacore.com>
+
 	* ada-valprint.c (ada_val_print_1): Add parameter "language".
 	Update calls to self accordingly.  Replace calls to c_val_print
 	by calls to val_print.
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 66cda39..ff0fa66 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -811,11 +811,9 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
 	  fprintf_filtered (stream, "0x0");
 	}
       else
-	ada_val_print_1 (value_type (val),
-			 value_contents_for_printing (val),
-			 value_embedded_offset (val),
-			 value_address (val), stream, recurse,
-			 val, options, language);
+	val_print (value_type (val), value_contents_for_printing (val),
+		   value_embedded_offset (val), value_address (val),
+		   stream, recurse, val, options, language);
       value_free_to_mark (mark);
       return;
     }
@@ -873,17 +871,14 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
 		= value_from_contents_and_address (type, valaddr + offset, 0);
 	      struct value *v = value_cast (target_type, v1);
 
-	      ada_val_print_1 (target_type,
-			       value_contents_for_printing (v),
-			       value_embedded_offset (v), 0,
-			       stream, recurse + 1, v, options,
-			       language);
+	      val_print (target_type, value_contents_for_printing (v),
+			 value_embedded_offset (v), 0, stream,
+			 recurse + 1, v, options, language);
 	    }
 	  else
-	    ada_val_print_1 (TYPE_TARGET_TYPE (type),
-			     valaddr, offset,
-			     address, stream, recurse,
-			     original_value, options, language);
+	    val_print (TYPE_TARGET_TYPE (type), valaddr, offset,
+		       address, stream, recurse, original_value,
+		       options, language);
 	  return;
 	}
       else
-- 
1.8.3.2


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