This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug tui/10829] New: Confusing results printed when a subexpression is optimized out
- From: "ajax at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 22 Oct 2009 14:52:47 -0000
- Subject: [Bug tui/10829] New: Confusing results printed when a subexpression is optimized out
- Reply-to: sourceware-bugzilla at sourceware dot org
In the X server during request processing, where "stuff" is a struct xReq * with
a member named class:
(gdb) print stuff
$3 = <value optimized out>
(gdb) print stuff->class
Cannot access memory at address 0x16
The naïve conclusion for the user is that "stuff" somehow became NULL, which is
not in fact true; its value is merely being flattened to zero before computing
the offset of the "class" member. The second print statement should be more
along the lines of "Cannot evaluate subexpression foo".
gdb version:
% rpm -q gdb
gdb-6.8.91.20090921-1.fc12.i686
--
Summary: Confusing results printed when a subexpression is
optimized out
Product: gdb
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tui
AssignedTo: unassigned at sourceware dot org
ReportedBy: ajax at redhat dot com
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=10829
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.