public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* m2-valprint.c, pass correct value and valaddr to m2_print_array_contents.
@ 2011-01-25 18:02 Pedro Alves
  0 siblings, 0 replies; only message in thread
From: Pedro Alves @ 2011-01-25 18:02 UTC (permalink / raw)
  To: gdb-patches

And another case where we ended up passing a NULL value to val_print.

Tested on x86_64-linux and checked in.

-- 
Pedro Alves

2011-01-25  Pedro Alves  <pedro@codesourcery.com>

	gdb/
	* m2-valprint.c (print_unbounded_array): Pass
	value_contents_for_printing rather than value_contents, to
	m2_print_array_contents.  Also pass in the value.

---
 gdb/m2-valprint.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: src/gdb/m2-valprint.c
===================================================================
--- src.orig/gdb/m2-valprint.c	2010-10-18 12:37:26.000000000 +0100
+++ src/gdb/m2-valprint.c	2010-10-18 12:47:14.000000000 +0100
@@ -201,9 +201,10 @@ m2_print_unbounded_array (struct type *t
   len = unpack_field_as_long (type, valaddr + embedded_offset, 1);
 
   fprintf_filtered (stream, "{");  
-  m2_print_array_contents (value_type (val), value_contents(val),
+  m2_print_array_contents (value_type (val),
+			   value_contents_for_printing (val),
 			   value_embedded_offset (val), addr, stream,
-			   recurse, NULL, options, len);
+			   recurse, val, options, len);
   fprintf_filtered (stream, ", HIGH = %d}", (int) len);
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-25 17:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25 18:02 m2-valprint.c, pass correct value and valaddr to m2_print_array_contents Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).