Bug 704494

Summary: ../../gdb/findvar.c:417: internal-error: read_var_value: Assertion `frame' failed.
Product: [Fedora] Fedora Reporter: Sam Varshavchik <mrsam>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: jan.kratochvil, pmuldoon, sergiodj, tromey
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 7.2.90.20110429-36.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-18 20:08:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Sample test program none

Description Sam Varshavchik 2011-05-13 12:02:28 UTC
Created attachment 498756 [details]
Sample test program

Description of problem:

gdb always crashes attempting to print the contents of a C++ class instance with a static __thread member.

Version-Release number of selected component (if applicable):

gdb-7.2-51.fc14.x86_64

How reproducible:

Always

Steps to Reproduce:

Use the attached sample program.
 
Actual results:

[mrsam@monster ~]$ g++ -g -o /tmp/gdb.tst /tmp/gdb.tst.C
[mrsam@monster ~]$ gdb /tmp/gdb.tst
GNU gdb (GDB) Fedora (7.2-51.fc14)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/gdb.tst...done.
(gdb) b foo
Breakpoint 1 at 0x40064c: file /tmp/gdb.C, line 25.
(gdb) run
Starting program: /tmp/gdb.tst 

Breakpoint 1, foo (yp=0x7fffffffe180) at /tmp/gdb.C:25
25		yp->v=1;   /* Set the breakpoint on this line */
Missing separate debuginfos, use: debuginfo-install glibc-2.13-1.x86_64 libgcc-4.5.1-4.fc14.x86_64 libstdc++-4.5.1-4.fc14.x86_64
(gdb) p *yp
$1 = {v = 0, static xp = warning: static field's value depends on the current frame - bad debug info?

../../gdb/findvar.c:417: internal-error: read_var_value: Assertion `frame' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) 


Expected results:

The contents of the class

Additional info:

Comment 1 Tom Tromey 2011-05-17 18:34:11 UTC
This was fixed upstream:

http://sourceware.org/bugzilla/show_bug.cgi?id=11803

The assert in question no longer exists there.

Comment 2 Jan Kratochvil 2011-05-18 20:08:31 UTC
F15 is going to be released these days, to be backported only on expliciti request, thanks.

GNU gdb (GDB) Fedora (7.2.90.20110429-36.fc15)
$1 = {v = 0, static xp = 0x7fffffffdca0}
(gdb) p &xinst
$3 = (x *) 0x7fffffffdca0