Bug 202727

Summary: FEAT: Suggest "try gcc -ggdb3" for: Cannot find thread-local variables
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: gdbAssignee: Alexandre Oliva <aoliva>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: aoliva, cagney, jan.kratochvil
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-25 13:53:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 185337    
Bug Blocks:    

Description Jan Kratochvil 2006-08-16 00:13:29 UTC
+++ 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): 
gdb-6.3.0.0-1.96 
 
How reproducible: 
Always. 
 
Steps to Reproduce: 
1.Compile the attached program with gcc -o convert -g convert.c 
2.gdb convert 
3.b 59 
4.run utf8 cp850 foobarbaz 
5.p errno 
 
Actual results: 
Cannot access memory at address 0x8 
 
Expected results: 
$1 = 0 
 
 
Additional info: 
This works on RHEL3, hence regression.

-- Additional comment from fenlason on 2006-03-13 15:26 EST --
Created an attachment (id=126068)
source for simple test program


-- Additional comment from fenlason on 2006-03-14 15:33 EST --
This is also broken in rawhide with gdb-6.3.0.0-1.122 

-- Additional comment from jan.kratochvil on 2006-07-25 08:30 EST --
Please retest if compiled with -ggdb3: gcc -o convert -ggdb3 convert.c
        -ggdb3  -ggdb2
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"

Comment 1 Jan Kratochvil 2006-09-25 13:53:46 UTC
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).