This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
m2-valprint.c, pass correct value and valaddr to m2_print_array_contents.
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 25 Jan 2011 17:45:35 +0000
- Subject: m2-valprint.c, pass correct value and valaddr to m2_print_array_contents.
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);
}