From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2666 invoked by alias); 20 Feb 2012 19:48:28 -0000 Received: (qmail 2656 invoked by uid 22791); 20 Feb 2012 19:48:27 -0000 X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Feb 2012 19:48:14 +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 q1KJmAgJ025441 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 20 Feb 2012 14:48:10 -0500 Received: from host2.jankratochvil.net (ovpn-116-21.ams2.redhat.com [10.36.116.21]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1KJm5Tw012374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 20 Feb 2012 14:48:07 -0500 Date: Mon, 20 Feb 2012 20:26:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Cc: Eli Zaretskii , Mark Wielaard , Doug Evans Subject: Re: [RFA take 5] Allow setting breakpoints on inline functions (PR 10738) Message-ID: <20120220194804.GA5968@host2.jankratochvil.net> References: <20120220155848.GA5813@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120220155848.GA5813@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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/msg00412.txt.bz2 On Mon, 20 Feb 2012 16:58:49 +0100, Gary Benson wrote: > This version of the patch has been updated to add a new command line > option, --allow-incomplete-gdb-indexes, Sorry I was a bit offline, I believe such option would be OK just as a vendor patch. Still I understand patching back the backward support is not easy so OK, one day it can get finally dropped. > --- a/gdb/dwarf2read.c > +++ b/gdb/dwarf2read.c [...] > @@ -2121,13 +2125,20 @@ dwarf2_read_index (struct objfile *objfile) > /* Versions earlier than 3 emitted every copy of a psymbol. This > causes the index to behave very poorly for certain requests. Version 3 > contained incomplete addrmap. So, it seems better to just ignore such > - indices. Index version 4 uses a different hash function than index > - version 5 and later. */ > - if (version < 4) > + indices. > + > + Index version 4 uses a different hash function than index version > + 5 and later. > + > + Versions earlier than 5 did not emit psymbols for inlined than 6 > + functions. Using these files will cause GDB not to be able to > + set breakpoints on inlined functions by name, so we ignore these > + indices unless --allow-incomplete-gdb-indexes was supplied. */ > + if (version < (allow_incomplete_gdb_indexes ? 4 : 6)) > return 0; > /* Indexes with higher version than the one supported by GDB may be no > longer backward compatible. */ > - if (version > 5) > + if (version > 6) > return 0; > > map = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct mapped_index); [...] > --- a/gdb/main.c > +++ b/gdb/main.c > @@ -87,6 +87,11 @@ int return_child_result_value = -1; > /* Whether to enable writing into executable and core files. */ > extern int write_files; > > +/* Whether to use incomplete .gdb-index sections. > + The default is to reject them. */ > + > +extern int allow_incomplete_gdb_indexes; > + Please no "extern var" in *.c files, it may lead to non-matching types etc. I understand it is present in the current codebase but this is not an excuse, fixed it now: [obv] Code cleanup: main.c declarations http://sourceware.org/ml/gdb-patches/2012-02/msg00410.html Put it to symfile.h where are declarations for other dwarf2read.c definitions. > @@ -975,6 +982,10 @@ This is the GNU debugger. Usage:\n\n\ > Options:\n\n\ > "), stream); > fputs_unfiltered (_("\ > + --allow-incomplete-gdb-indexes\n\ > + Do not reject incomplete .gdb-index sections.\n\ I do not understand the option meaning in such terse form. As English non-native I would prefer just "old" everywhere (or Doug says "deprecated"). Do not reject old (incomplete) .gdb-index sections.\n\ OK for check-in with these and Eli's changes. Thanks, Jan