From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7727 invoked by alias); 11 Jan 2015 13:14:03 -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 7717 invoked by uid 89); 11 Jan 2015 13:14:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 11 Jan 2015 13:14:00 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0BDDvfU015094 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 11 Jan 2015 08:13:57 -0500 Received: from host2.jankratochvil.net (ovpn-116-51.ams2.redhat.com [10.36.116.51]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0BDDrsG018152 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 11 Jan 2015 08:13:56 -0500 Date: Sun, 11 Jan 2015 13:14:00 -0000 From: Jan Kratochvil To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [patch] Fix jit-reader.h for multilib Message-ID: <20150111131353.GA9107@host2.jankratochvil.net> References: <20150107173634.GA13295@host2.jankratochvil.net> <87387htths.fsf@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87387htths.fsf@codesourcery.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00272.txt.bz2 On Sun, 11 Jan 2015 13:02:55 +0100, Yao Qi wrote: > Jan Kratochvil writes: > > > I got reported jit-reader.h is not multi-lib safe: > > > > --- /usr/include/gdb/jit-reader.h on x86_64 2015-01-07 11:54:27.705802129 -0500 > > +++ /usr/include/gdb/jit-reader.h on i686 2015-01-07 11:54:46.853774165 -0500 > > @@ -56,7 +56,7 @@ extern "C" { > > > > /* Represents an address on the target system. */ > > > > -typedef unsigned long GDB_CORE_ADDR; > > +typedef unsigned long long GDB_CORE_ADDR; > > > > /* Return status codes. */ > > > > > > multi-lib safety means that files with the same pathname (which is > > /usr/include, contrary to /usr/lib vs. /usr/lib64 for example). > > I am sorry I can't understand what you mean here, can you elaborate? Sorry I see I haven't finished the sentence, it should have been: # multi-lib safety means that files with the same pathname (which is # /usr/include, contrary to /usr/lib vs. /usr/lib64 for example) # contain exactly the same content. See also: https://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks#File_conflicts When we discuss it personally I do not think multilib should be applied to the GDB package as there is nothing like /usr/lib{,64}/libgdb.so. There is only /usr/bin/gdb and that has always just one arch on one system. So installing gdb.i686 and gdb.x86_64 simultaneously does not have any benefits / makes sense. But despites this I need it for Red Hat packaging so I am fine to also keep it just as a downstream patch. OTOH I guess other OS packagers may also face it so it may be easier for everyone to do it upstream. > Do you mean sizeof (GDB_CORE_ADDR) should be the same on different > multi-lib (i686 vs x86_64)? For multilib it does not matter what is the runtime GDB_CORE_ADDR type but the text defining it (in /usr/include/gdb/jit-reader.h) has to be the same for archs sharing multilib. IIUC GDB requires for GDB_CORE_ADDR: * sizeof (GDB_CORE_ADDR) >= sizeof (CORE_ADDR) * sizeof (GDB_CORE_ADDR) is preferrably the smallest available size Jan