From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24304 invoked by alias); 21 Oct 2002 20:39:34 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24292 invoked from network); 21 Oct 2002 20:39:34 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 21 Oct 2002 20:39:34 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g9LKIKw22502 for ; Mon, 21 Oct 2002 16:18:20 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9LKdXf23573 for ; Mon, 21 Oct 2002 16:39:33 -0400 Received: from localhost.redhat.com (IDENT:OVrAVF3C9CU0GUST8vekwSG4eFPKZkHm@tooth.toronto.redhat.com [172.16.14.29]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9LKdVw12266; Mon, 21 Oct 2002 16:39:31 -0400 Received: by localhost.redhat.com (Postfix, from userid 469) id 56109FF79; Mon, 21 Oct 2002 16:36:47 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15796.25948.439753.439692@localhost.redhat.com> Date: Mon, 21 Oct 2002 13:39:00 -0000 To: Elena Zannoni Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH/RFC] TLS support part 1 In-Reply-To: <15770.25139.262675.365054@localhost.redhat.com> References: <15770.25139.262675.365054@localhost.redhat.com> X-SW-Source: 2002-10/txt/msg00351.txt.bz2 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 : > 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 : > 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 : > 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 > Elena Zannoni > > * 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