From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23884 invoked by alias); 4 Dec 2014 00:24:44 -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 23874 invoked by uid 89); 4 Dec 2014 00:24:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 Dec 2014 00:24:42 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XwKDl-00005m-KI from Maciej_Rozycki@mentor.com ; Wed, 03 Dec 2014 16:24:37 -0800 Received: from localhost (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.3.181.6; Thu, 4 Dec 2014 00:24:36 +0000 Date: Thu, 04 Dec 2014 00:24:00 -0000 From: "Maciej W. Rozycki" To: Doug Evans CC: Joel Brobecker , "gdb-patches@sourceware.org" , Rich Fuhler , Richard Sandiford Subject: Re: [PATCH v2 2/2] Correct invalid assumptions made by (mostly) DWARF-2 tests In-Reply-To: Message-ID: References: <20120611182043.GA7597@adacore.com> <20141116110934.GH5774@adacore.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2014-12/txt/msg00076.txt.bz2 On Sun, 16 Nov 2014, Doug Evans wrote: > >> Sorry for the followup, but FAOD, .4byte. > >> .word may be a different size on some platforms. > > > > If anything, that would have to be `.4byte'. > > > > I chose `.dc.l' because it is the only fully portable GAS pseudo-op to > > produce 32-bit data output. Testing portability was the actual reason > > to add all the `.dc.*' pseudo-ops to GAS. As you've already observed > > `.word' is unportable, and neither is `.4byte' as the latter is only > > supported for ELF targets. However in DWARF-2 testing we're probably on > > an ELF target anyway. > > Yeah. We've been using .4byte for portability in gdb.dwarf2 as long > as I can remember. > > I didn't know about .dc.l, but there's nothing in the name that screams > "portability" to me. In fact, I can imagine it causing at least a few > people to have > to spend time looking it up just to verify it's OK to use (whereas > they'd be less > inclined to with ".4byte"). Not good. I stuck to the wrong assumption GAS is going to be used with test suite runs, as if it was a part of GDB just as it is a part of binutils. It is not, despite sharing the repository. While maybe less common these days another assembler can be used by the compiler run in testing and `.dc.l' can only be considered portable among GAS's targets and not different assemblers. So we can't really use the pseudo-op, unlike `.4byte' that we already rely on. > > So I'll update the tests to use `.4byte'. Thanks for your review. > > Cool. I've got one more review coming. Applied now, with the update requested and having regression-tested it. Thanks again for the review. Maciej