Red Hat Bugzilla – Bug 202727
FEAT: Suggest "try gcc -ggdb3" for: Cannot find thread-local variables
Last modified: 2007-11-30 17:11:40 EST
+++ This bug was initially created as a clone of Bug #185337 +++
Description of problem:
I compiled a simple test program, started gdb on it, set a breakpoint, started
my program, and after it hit the breakpoint, attempted to "p errno". Instead
of printing the value of errno, gdb said "Cannot access memory at address 0x8"
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Compile the attached program with gcc -o convert -g convert.c
4.run utf8 cp850 foobarbaz
Cannot access memory at address 0x8
$1 = 0
This works on RHEL3, hence regression.
-- Additional comment from email@example.com on 2006-03-13 15:26 EST --
Created an attachment (id=126068)
source for simple test program
-- Additional comment from firstname.lastname@example.org on 2006-03-14 15:33 EST --
This is also broken in rawhide with gdb-188.8.131.52-1.122
-- Additional comment from email@example.com on 2006-07-25 08:30 EST --
Please retest if compiled with -ggdb3: gcc -o convert -ggdb3 convert.c
FC5 gdb OK Cannot find thread-local variables
CVS gdb OK Cannot access memory at address 0x8
FC4 gdb OK Cannot access memory at address 0x8
As it is fixed by on of the Red Hat vendor patches, suggesting to extend the
error message by: ", try gcc -ggdb3"
Bug 185337 is resolving it the proper way - by TLS decoding.
"-ggdb3" suggestion is a wrong workaround (too expensive and not applicable to
all the TLS symbols).