This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug mi/9752] New: MI -data-evaluate-expression prints optimized-out variable value as 0x0
- From: "rschooler at tilera dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 16 Jan 2009 21:04:57 -0000
- Subject: [Bug mi/9752] New: MI -data-evaluate-expression prints optimized-out variable value as 0x0
- Reply-to: sourceware-bugzilla at sourceware dot org
Eclipse/CDT, when hovering over a variable in a source pane, will display 0x0 as
the value for optimized-out variables that don't show up in the Variables pane.
This appears to be an underlying GDB problem with the MI interface it uses to
talk to external front ends. Here's a transcript running ?gdb -interpreter=mi?,
and typing a mix of normal and MI commands at it:
(gdb) p ecs
&"p ecs\n"
~"$1 = <value optimized out>\n"
^done
(gdb) -data-evaluate-expression ecs
^done,value="0x0"
So the normal command-line command does the right thing, but the MI version
does not.
This appears to be because the command-line path calls print_formatted(), which
calls value_print(), which calls value_check_printable(), which checks for
value_optimized_out().
The MI path calls val_print() directly, which doesn't check.
--
Summary: MI -data-evaluate-expression prints optimized-out
variable value as 0x0
Product: gdb
Version: 6.8
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: mi
AssignedTo: unassigned at sourceware dot org
ReportedBy: rschooler at tilera dot com
CC: gdb-prs at sourceware dot org
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.