This is the mail archive of the mailing list for the Archer 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]

Re: [python] refactor pretty-printing, again

>>>>> "Paul" == Paul Pluzhnikov <> writes:

Paul> I wonder if printing the reference (and the address of string)
Paul> should be controlled by a separate 'print reftype on/off',
Paul> 'print arrayaddr on/off', or some such?

I'm just going to nuke references using the appended.
This isn't maximally efficient but I don't think it matters much.

I'm not sure what to do about string addresses.
We could be horrible and strip them in the std::string printer :-)


2008-11-12  Tom Tromey  <>

	* valprint.c (value_print): Call apply_val_pretty_printer.

diff --git a/gdb/valprint.c b/gdb/valprint.c
index c580f39..37e5efc 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -326,6 +326,18 @@ value_print (struct value *val, struct ui_file *stream, int format,
     return 0;
   raw_printing = raw;
+  if (!raw)
+    {
+      int r = apply_val_pretty_printer (value_type (val),
+					value_contents_all (val),
+					value_embedded_offset (val),
+					value_address (val),
+					stream, format, 1, 0, pretty,
+					current_language);
+      if (r)
+	return r;
+    }
   return LA_VALUE_PRINT (val, stream, format, pretty);

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