From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20239 invoked by alias); 15 Jan 2014 21:25:27 -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 20227 invoked by uid 89); 15 Jan 2014 21:25:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f202.google.com Received: from mail-ob0-f202.google.com (HELO mail-ob0-f202.google.com) (209.85.214.202) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 15 Jan 2014 21:25:25 +0000 Received: by mail-ob0-f202.google.com with SMTP id vb8so360536obc.5 for ; Wed, 15 Jan 2014 13:25:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:cc:subject:in-reply-to :references; bh=K/QCw2oZh9xh6YeIMQl/4hl7N0tWCk/9apntnhTSphY=; b=eLJxUw82HmHOyDsPqYwhHKV9jiyt4oPZOeYBA9GogrygMb7XKZYhiE5RGHLCCHM0ye 0uS8nWSRZEHPwnmDmcclgEVrF49rL6jMzJ1k8ZGdcJoHojSlVU7klcLJnunkpvgI7gTe 2v/bnp66zFCd45xdIHHGNui4dh6lONziLLBcd+du6sSD68HPxtNkYrml7iK8Zz1T9IqB plGcigF4iBGLQI7Y7XYGRtaQhg33R5+g6DdntywDKnkrs2knjCNi/823Ynd4ANdzCi4n /v0Ft6gXd/NEmpnYo2mb68btB3zWRkt9Rf+yjoYMPVCC5l+L+onaZGn3+D6xvNDr8tSY zNCg== X-Gm-Message-State: ALoCoQla+N9AgBP3OQEF0bXvJKhxS020txgBoJsxQP2FQIRjmsSWof06KMHPPHary8RCxpgUa584I+iC232atPrXc9f+6UgQ57QjThIWECJozBacYyvf68ygi8QWSJ2P+Vttu1AZkobIi2lVxYbSkjokviZcCk6wP8yxESdvxVKaSGampW3e8bpC4rSZ2Bs99YfjtOqrGkp3kUPPfY+SDGnR+fAB09HBgQ== X-Received: by 10.43.135.4 with SMTP id ie4mr1555120icc.1.1389821124099; Wed, 15 Jan 2014 13:25:24 -0800 (PST) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id v64si1698019yhm.3.2014.01.15.13.25.24 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Jan 2014 13:25:24 -0800 (PST) Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.17.128.44]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 6383531C1EF; Wed, 15 Jan 2014 13:25:23 -0800 (PST) From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21206.64706.812098.20292@ruffy.mtv.corp.google.com> Date: Wed, 15 Jan 2014 21:25:00 -0000 To: Pedro Alves , Eli Zaretskii cc: gdb-patches@sourceware.org Subject: Re: [PUSHED] Fix go32-nat.c build fallout from to_detach constification. In-Reply-To: <52D6C940.3040008@redhat.com> References: <52D6B91C.2030402@redhat.com> <83d2jt418x.fsf@gnu.org> <52D6C940.3040008@redhat.com> X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00568.txt.bz2 Pedro Alves writes: > On 01/15/2014 05:13 PM, Eli Zaretskii wrote: > > > /* The DWP file version is stored in the hash table. Oh well. */ > > if (dwp_file->cus->version != dwp_file->tus->version) > > { > > /* Technically speaking, we should try to limp along, but this is > > pretty bizarre. */ > > error (_("Dwarf Error: DWP file CU version %d doesn't match" <<<<<< > > " TU version %d [in DWP file %s]"), <<<<<<<<<<<<<<<<<<<<<< > > dwp_file->cus->version, dwp_file->tus->version, dwp_name); > > > > So it really tries to format uint32_t values with %d. > > Wait, we've been through this before. > See 21aa081e21da472e1e470d57770953c5e5c01477 (below). > So, that should be adjusted to do pulongest instead. Headaches indeed. Oh well. I've pushed this to trunk and the 7.7 branch. 2014-01-15 Doug Evans * dwarf2read.c (open_and_init_dwp_file): Use pulongest to print uint32_t. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 90c60cd..71bbe96 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -10544,10 +10544,12 @@ open_and_init_dwp_file (void) if (dwp_file->cus->version != dwp_file->tus->version) { /* Technically speaking, we should try to limp along, but this is - pretty bizarre. */ - error (_("Dwarf Error: DWP file CU version %d doesn't match" - " TU version %d [in DWP file %s]"), - dwp_file->cus->version, dwp_file->tus->version, dwp_name); + pretty bizarre. We use pulongest here because that's the established + portability solution (e.g, we can use %u for uint32_t). */ + error (_("Dwarf Error: DWP file CU version %s doesn't match" + " TU version %s [in DWP file %s]"), + pulongest (dwp_file->cus->version), + pulongest (dwp_file->tus->version), dwp_name); } dwp_file->version = dwp_file->cus->version;