This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/RFC] TLS support part 1


Elena Zannoni writes:
 > 
 > This part of the tls changes deal with the symbol handling.
 > I.e. recognizes the debug information, and sets up variables with the
 > appropriate address information.  Then it requests the address to be
 > computed by the target/thread code.
 > 
 > BTW: the debug info looks like this (in a simple case):
 > 
 >  <1><1e2c>: Abbrev Number: 32 (DW_TAG_variable)
 >      DW_AT_name        : (indirect string, offset: 0xc0d): a_tls        
 >      DW_AT_decl_file   : 1      
 >      DW_AT_decl_line   : 4      
 >      DW_AT_type        : <c75>  
 >      DW_AT_external    : 1      
 >      DW_AT_location    : 6 byte block: 3 0 0 0 0 e0     (DW_OP_addr: 0; DW_OP_GNU_push_tls_address; )
 >  <1><1e3f>: Abbrev Number: 32 (DW_TAG_variable)
 >      DW_AT_name        : (indirect string, offset: 0xb42): b_tls        
 >      DW_AT_decl_file   : 1      
 >      DW_AT_decl_line   : 5      
 >      DW_AT_type        : <c75>  
 >      DW_AT_external    : 1      
 >      DW_AT_location    : 6 byte block: 3 4 0 0 0 e0     (DW_OP_addr: 4; DW_OP_GNU_push_tls_address; )
 >  <1><1e52>: Abbrev Number: 32 (DW_TAG_variable)
 >      DW_AT_name        : (indirect string, offset: 0xaa8): c_tls        
 >      DW_AT_decl_file   : 1      
 >      DW_AT_decl_line   : 6      
 >      DW_AT_type        : <c75>  
 >      DW_AT_external    : 1      
 >      DW_AT_location    : 6 byte block: 3 8 0 0 0 e0     (DW_OP_addr: 8; DW_OP_GNU_push_tls_address; )
 > 
 > I.e. a_tls, b_tls, c_tls are thread local storage variables at offset
 > 0, 4, 8 respectively within the thread local storage.
 > 
 > The next patch will deal with the actual computation of the address.
 > 
 > Elena
 > 
 > 2002-10-01  Jim Blandy  <jimb@redhat.com>
 > 	    Elena Zannoni  <ezannoni@redhat.com>
 > 
 > 	* symtab.h (address_class): Re-add LOC_THREAD_LOCAL_STATIC
 > 	for thread local storage locations.
 > 	(struct symbol): Add objfile field.
 > 	(SYMBOL_OBJFILE): Define.
 > 	* dwarf2read.c (is_thread_local): New static variable.
 > 	(new_symbol): If variable is in thread local fill in address class
 > 	and objfile appropriately.
 > 	(decode_locdesc): Recognize and handle DW_OP_GNU_push_tls_address
 > 	stack operation.
 > 	* printcmd.c (address_info): Print the information for thread
 > 	local storage variable.
 > 	* findvar.c (read_var_value): In case of thread local variable,
 > 	defer to the target vector code to compute address.

[forgot to send mail].
I have committed this (after updating the comment per Jim's request).

Elena


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]