From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18869 invoked by alias); 14 Mar 2012 17:51:10 -0000 Received: (qmail 18860 invoked by uid 22791); 14 Mar 2012 17:51:09 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-ee0-f41.google.com (HELO mail-ee0-f41.google.com) (74.125.83.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Mar 2012 17:50:56 +0000 Received: by eeke53 with SMTP id e53so1303841eek.0 for ; Wed, 14 Mar 2012 10:50:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding:x-system-of-record :x-gm-message-state; bh=sjxQW06WkRI+t2rF9TzcStyl2jJy9zW75jFe3qe2QFE=; b=YHglCL4mggTdTvJKwCWbT5FMQPRkQBFSbqYMozC2OgXWHuznKUMh49JlyWWu24rFvN cPZalTYtlGTnKYLve0vozseR5MIvrJ2MG1xJWd9F9WeYn6y71Kdaqemy0aUFyNKEAcLI iYgT4pPLyNT0XhzZrx+QmZQ+UTJMgoEGhT88dsZLB6gsVfo7WbpzTm0v4XKFAMPPYNet H/zi66PgTJ8d5e+scaJQgNEUo4AblN3pzCJrkoBcFQDGZlzTdqZ6mxgPsb2dt7StCnCG cTIwSjRXsR/YBzFwLqpy7OpkLL+y6j/j6AifakS/k18IQPj9OkhJIcGqTiOMm3H6jS4l fewg== Received: by 10.52.240.161 with SMTP id wb1mr2628556vdc.20.1331747455194; Wed, 14 Mar 2012 10:50:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.240.161 with SMTP id wb1mr2628542vdc.20.1331747455107; Wed, 14 Mar 2012 10:50:55 -0700 (PDT) Received: by 10.220.187.12 with HTTP; Wed, 14 Mar 2012 10:50:55 -0700 (PDT) In-Reply-To: <20120314133746.GA5696@redhat.com> References: <20120314133746.GA5696@redhat.com> Date: Wed, 14 Mar 2012 17:51:00 -0000 Message-ID: Subject: Re: [RFA take 6] Allow setting breakpoints on inline functions (PR 10738) From: Doug Evans To: gdb-patches@sourceware.org, Eli Zaretskii , Mark Wielaard , Jan Kratochvil , gbenson@redhat.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQkZZx9Yv1pD/JfU8GG8RVn9rTdvwIImbK3kAcUGZFhKL8nsL0fP+eKBmEfYaU+rh550bKNw13EN3pH1iaImRJy4uigLU3lMcz5qbGQxWqJpdtIviZ1TPG9HUOjzKXQluWvnaPCSn06A3MBqCi0aHlO++ue1JA== 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-03/txt/msg00493.txt.bz2 On Wed, Mar 14, 2012 at 6:37 AM, Gary Benson wrote: > Hi all, > > This patch makes GDB able to set breakpoints on inlined functions. > > This version of the patch has been updated to address Eli, Jan > and Doug's comments on my previous version. =A0I have renamed the > compatibility option from --allow-incomplete-gdb-indexes to > --use-old-index-sections and documented the option in NEWS. =A0I > also added a warning which will be printed the first time GDB > finds an old .gdb_index section if --use-old-index-sections is > not being used. =A0Note that I had to modify some tests to ignore > these messages. =A0The documentation is essentially unchanged bar > some specific changes Eli requested. > > How does this look? Cool, thanks. nit: ChangeLog description needs to be updated to use the renamed option. + if (use_old_index_sections) + { + if (version < 4) + return 0; + } + else + { + if (version < 6) + { + static int warning_printed =3D 0; + if (!warning_printed) + { + warning (_("Skipping old .gdb_index section in %s."), + objfile->name); + warning_printed =3D 1; + } + return 0; + } + } If we're going to print warnings (and I think that's a great idea), then we should do so consistently. - for the "if (use_old_index_sections)" case, print warning "if (version < = 4)" - I think we should print different warnings for versions < 4, and versions= 4,5. versions < 4: something like "Skipping obsolete .gdb-index section in %s"= ? versions 4,5: something like "Skipping old .gdb_index section in %s, pass --use-old-index-sections to use them anyway" ? [suitably formatted and worded] fputs_unfiltered (_("\ + --use-old-index-sections\n\ + Do not reject old (broken) .gdb_index sections.\n\ +"), stream); s/(broken)/(incomplete)/ Ok with me with those nits fixed. [I didn't dig into the actual logic of the implementation, I'm assuming that's already been vetted.]