Hide Forgot
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:
This was fixed upstream: http://sourceware.org/bugzilla/show_bug.cgi?id=11803 The assert in question no longer exists there.
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