From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: m2-valprint.c, pass correct value and valaddr to m2_print_array_contents.
Date: Tue, 25 Jan 2011 18:02:00 -0000 [thread overview]
Message-ID: <201101251745.36295.pedro@codesourcery.com> (raw)
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);
}
reply other threads:[~2011-01-25 17:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201101251745.36295.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).