This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug mi/9752] MI -data-evaluate-expression prints optimized-out variable value as 0x0
- From: "nickrob at snap dot net dot nz" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 19 Jan 2009 20:29:50 -0000
- Subject: [Bug mi/9752] MI -data-evaluate-expression prints optimized-out variable value as 0x0
- References: <20090116210457.9752.rschooler@tilera.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From nickrob at snap dot net dot nz 2009-01-19 20:29 -------
Subject: RE: MI -data-evaluate-expression prints optimized-out variable value as 0x0
Richard Schooler writes:
> Yes and no. Your source base seems to have changed from the 6.8 we
> started with.
I've started with gdb in current CVS.
> My diff is:
>
> ==== //tilera/main/tools/gnu/gdb/mi/mi-main.c#3 -
> /u/rschooler/p4/tools/gnu/gdb/mi/mi-main.c ====
> @@ -670,9 +670,7 @@
> val = evaluate_expression (expr);
>
> /* Print the result of the expression evaluation. */
> - val_print (value_type (val), value_contents (val),
> - value_embedded_offset (val), VALUE_ADDRESS (val),
> - stb->stream, 0, 0, 0, 0);
> + common_val_print (val, stb->stream, 0, 0, 0, 0);
>
> ui_out_field_stream (uiout, "value", stb);
> ui_out_stream_delete (stb);
>
> This worked for me. Should I go with this change now, or wait for some
> more official patch, with regression testing, etc.?
Well, there probably won't be a backport to 6.8, so if that's what you're
using, you need to make your own patch. For my patch to get into GDB for
the next release (7.0), it needs to be approved by the MI or a global
maintainer.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=9752
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.