public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug mi/9752] New: MI -data-evaluate-expression prints optimized-out variable value as 0x0
@ 2009-01-16 21:04 rschooler at tilera dot com
  2009-01-16 22:17 ` [Bug mi/9752] " nickrob at snap dot net dot nz
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: rschooler at tilera dot com @ 2009-01-16 21:04 UTC (permalink / raw)
  To: gdb-prs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1420 bytes --]

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.


^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <bug-9752-4717@http.sourceware.org/bugzilla/>]

end of thread, other threads:[~2010-10-15  1:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-16 21:04 [Bug mi/9752] New: MI -data-evaluate-expression prints optimized-out variable value as 0x0 rschooler at tilera dot com
2009-01-16 22:17 ` [Bug mi/9752] " nickrob at snap dot net dot nz
2009-01-19 18:40 ` rschooler at tilera dot com
2009-01-19 20:29 ` nickrob at snap dot net dot nz
2009-04-12 16:54 ` tromey at redhat dot com
2009-04-13  2:23 ` nickrob at snap dot net dot nz
2009-04-13 21:58 ` tromey at redhat dot com
2009-04-14  6:50 ` nickrob at snap dot net dot nz
2009-04-14 16:20 ` tromey at redhat dot com
2009-04-15  6:54 ` nickrob at snap dot net dot nz
     [not found] <bug-9752-4717@http.sourceware.org/bugzilla/>
2010-10-15  1:53 ` tromey at redhat dot com

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).