From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2168 invoked by alias); 14 Feb 2012 09:34:02 -0000 Received: (qmail 1889 invoked by uid 22791); 14 Feb 2012 09:34:01 -0000 X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=AWL,BAYES_20 X-Spam-Check-By: sourceware.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (80.101.103.228) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Feb 2012 09:33:48 +0000 Date: Tue, 14 Feb 2012 09:34:00 -0000 From: Mark Wielaard To: Gary Benson Cc: gdb-patches@sourceware.org, Jan Kratochvil Subject: Re: [RFA take 4] Allow setting breakpoints on inline functions (PR 10738) Message-ID: <20120214093344.GA2439@toonder.wildebeest.org> References: <20120213184700.GA31170@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120213184700.GA31170@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.9 (--) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00254.txt.bz2 On Mon, Feb 13, 2012 at 06:47:00PM +0000, Gary Benson wrote: > This patch bumps the version number of the .gdb-index to 6, but > it does not remove any of the backwards compatibility code which > I would prefer to do as a separate patch. > [...] > @item > -The version number, currently 5. Versions 1, 2 and 3 are obsolete. > -Version 4 differs by its hashing function. > +The version number, currently 6. Versions 1, 2, 3, 4 and 5 are > +obsolete. > > @item > The offset, from the start of the file, of the CU list. > @@ -38786,18 +38778,9 @@ valid index for both a string and a CU vector. > The hash value for a table entry is computed by applying an > iterative hash function to the symbol's name. Starting with an > initial value of @code{r = 0}, each (unsigned) character @samp{c} in > -the string is incorporated into the hash using the formula depending on the > -index version: > - > -@table @asis > -@item Version 4 > -The formula is @code{r = r * 67 + c - 113}. > - > -@item Version 5 > -The formula is @code{r = r * 67 + tolower (c) - 113}. > -@end table > - > -The terminating @samp{\0} is not incorporated into the hash. > +the string is incorporated into the hash using the formula > +@code{r = r * 67 + tolower (c) - 113}. The terminating @samp{\0} is > +not incorporated into the hash. > > The step size used in the hash table is computed via > @code{((hash * 17) & (size - 1)) | 1}, where @samp{hash} is the hash I think you should keep the historical information about older versions and add precisely which symbols weren't included with version 5 that are now included with version 6 in the documentation of the gdb index format. That will be helpful for other producers and consumers of the .gdb_index section (elfutils/binutils readelf, gold --gdb-index option). Thanks, Mark