From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114496 invoked by alias); 29 May 2015 16:32:29 -0000 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 Received: (qmail 114472 invoked by uid 89); 29 May 2015 16:32:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-ie0-f175.google.com Received: from mail-ie0-f175.google.com (HELO mail-ie0-f175.google.com) (209.85.223.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 29 May 2015 16:32:26 +0000 Received: by iesa3 with SMTP id a3so67009631ies.2 for ; Fri, 29 May 2015 09:32:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=Zz6jUXVvUWJk+stW20MvLkpgxHMCmUhkLUP6xPwR6Eg=; b=azXgjetkRXasSuA2HH7E5S7QZ37LxeHvP6QWrQqcM9dv8fFPNAKN96c61n/1LsWNgR xNwucDE7kdCi0TXSQlu1ZQUmC3mSVxfj+VqajodPygmTwn0sAFzv6u80XqWBZxXU2d8v C+SRFaaR9xbGkYpbMIp91285IjBWP5z7VNbaetP6IlPzHdqQX4HXRO2kMfYws6DCLOov 0FRyYpIUP5nnqjmCKkQAk9rt+dOa0Mgd+0EafQd72VlTuyqYnKvIJH5ezm6Nby/wDAmn lr0wOFQs6dHdZV6plKdmyPnXxbKjNMoVqaLr4kNUhiPQ5At1p07HAi1aX/boEedFYp7G mucw== X-Gm-Message-State: ALoCoQmfOAmqacziMvcYXqE1RKgY5H404jCuvjR7zl6iXo7uRK7WBnAt3Ecg4v3VSEa6/PRGLpgd X-Received: by 10.50.18.39 with SMTP id t7mr5106139igd.3.1432917143953; Fri, 29 May 2015 09:32:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.65.14.201 with HTTP; Fri, 29 May 2015 09:32:03 -0700 (PDT) In-Reply-To: <55683A6F.2030600@redhat.com> References: <55683A6F.2030600@redhat.com> From: Roland McGrath Date: Fri, 29 May 2015 16:32:00 -0000 Message-ID: Subject: Re: [PATCH users/roland/osabi-assert] Do not crash on unrecognized GNU .note.ABI-tag values To: Pedro Alves Cc: GDB Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-05/txt/msg00721.txt.bz2 On Fri, May 29, 2015 at 3:07 AM, Pedro Alves wrote: > In order to get this into a release branch, the protocol is to file > a PR and then once fixed, list the fix in the release page in the wiki: > > https://sourceware.org/gdb/wiki/GDB_7.9_Release > > That helps the release manager build the release notes. I've filed 18464 for it. I'm not clear from what you said here whether I should cherry-pick the commit onto the branch myself, or just list it in the "Maybe" section on the wiki to wait for approval. >> + warning ("GNU ABI tag value %u unrecognized.\n", abi_tag); > > Wrap string in _(). I was following the model of the other warning call in that file (and the end of gdbarch_init_osabi). It seemed odd to me that it didn't have a translation wrapper. But looking around the rest of the code, I see now that gdbarch_init_osabi is the outlier, and normal usage is to have a translation wrapper and now trailing newline. So I've fixed the new call. > Indentation looks odd. tabs vs spaces? (We use tabs in gdb.) I've found a lot of inconsistency as to that in this repository (and even in this particular file). I've fixed it to use tabs. >> + *osabi = GDB_OSABI_UNKNOWN; > > This line is not necessary. It if were, we'd need to do the > same in the other two paths that don't match anything in > this function too. OK. Below is what I've committed to the trunk. Can I cherry-pick it to the 7.9 branch too? Thanks, Roland gdb/ 2015-05-29 Roland McGrath PR gdb/18464 * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Use warning rather than internal_error for an unrecognized value. diff --git a/gdb/osabi.c b/gdb/osabi.c index 9d90c55..3581eb3 100644 --- a/gdb/osabi.c +++ b/gdb/osabi.c @@ -493,10 +493,8 @@ generic_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect, void *obj) break; default: - internal_error (__FILE__, __LINE__, - _("generic_elf_osabi_sniff_abi_tag_sections: " - "unknown OS number %d"), - abi_tag); + warning (_("GNU ABI tag value %u unrecognized."), abi_tag); + break; } return; }