From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23120 invoked by alias); 27 May 2013 17:32:59 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 23108 invoked by uid 89); 27 May 2013 17:32:59 -0000 X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 27 May 2013 17:32:57 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4RHWtFb026976 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 27 May 2013 13:32:56 -0400 Received: from host2.jankratochvil.net (ovpn-116-33.ams2.redhat.com [10.36.116.33]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4RHWp3A000891 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Mon, 27 May 2013 13:32:54 -0400 Date: Mon, 27 May 2013 17:32:00 -0000 From: Jan Kratochvil To: gdb@sourceware.org Subject: Re: FYI DWARF .gdb_index-like proposal by Apple Message-ID: <20130527173251.GA27173@host2.jankratochvil.net> References: <20130527133410.GA8971@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130527133410.GA8971@host2.jankratochvil.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-05/txt/msg00120.txt.bz2 On Mon, 27 May 2013 15:34:10 +0200, Jan Kratochvil wrote: > just a highlight of submitted DWARF extension with new indexes: > http://www.dwarfstd.org/ShowIssue.php?issue=130410.1&type=open > > I have not checked yet if it is sufficient for GDB instead of .gdb_index. In the proposal ".debug_names" entries for DW_TAG_variable should support also TLS variables (which do not use DW_OP_addr required by the proposal). Compared with GDB .gdb_index: http://sourceware.org/gdb/current/onlinedocs/gdb/Index-Section-Format.html#Index-Section-Format (1) The proposal does not have any address -> name index; there is .debug_aranges but that is probably deprecated by the proposal above plus it has other issues: http://www.dwarfstd.org/ShowIssue.php?issue=100430.1&type=open http://www.dwarfstd.org/ShowIssue.php?issue=100430.2&type=open (2) The proposal symbol names are either fully qualified mangled or just DW_AT_name; .gdb_index uses demangled fully qualified name. The problem is GDB cannot mangle names so GDB would have to make the look up via DW_AT_name where may occur many lookup collisions. (3) .gdb_index has single hash table; the proposal uses 3 hash tables, this is less efficient. One should use DW_ATOM_die_tag there anyway to look up only symbol kinds GDB is interested in - .gdb_index uses it with performance gain in: http://sourceware.org/ml/gdb-patches/2012-06/msg00607.html And with DW_ATOM_die_tag present the 3 hash tables could be merged. (4) .gdb_index provides global/static flag for each symbol; one could use new DW_ATOM_* kind but that costs 1 byte, not 1 bit; one wants to look up only global symbol first while there are usually many static symbols of the same name, performance data is in the same URL above. Jan