In the X server during request processing, where "stuff" is a struct xReq * with a member named class: (gdb) print stuff $3 = (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.