From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14863 invoked by alias); 16 Nov 2014 21:52:04 -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 14843 invoked by uid 89); 16 Nov 2014 21:52:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f170.google.com Received: from mail-yk0-f170.google.com (HELO mail-yk0-f170.google.com) (209.85.160.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 16 Nov 2014 21:52:02 +0000 Received: by mail-yk0-f170.google.com with SMTP id q200so3975586ykb.15 for ; Sun, 16 Nov 2014 13:52:00 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.236.210.98 with SMTP id t62mr21782970yho.3.1416174720730; Sun, 16 Nov 2014 13:52:00 -0800 (PST) Received: by 10.170.81.68 with HTTP; Sun, 16 Nov 2014 13:52:00 -0800 (PST) In-Reply-To: References: <20120611182043.GA7597@adacore.com> <20141116110934.GH5774@adacore.com> Date: Sun, 16 Nov 2014 21:52:00 -0000 Message-ID: Subject: Re: [PATCH v2 2/2] Correct invalid assumptions made by (mostly) DWARF-2 tests From: Doug Evans To: "Maciej W. Rozycki" Cc: Joel Brobecker , "gdb-patches@sourceware.org" , Rich Fuhler , Richard Sandiford Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00383.txt.bz2 On Sun, Nov 16, 2014 at 12:05 PM, Maciej W. Rozycki wrote: > On Sun, 16 Nov 2014, Doug Evans wrote: > >> >>> Index: gdb-fsf-trunk-quilt/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S >> >>> =================================================================== >> >>> --- >> >>> gdb-fsf-trunk-quilt.orig/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S >> >>> 2014-10-02 07:56:23.000000000 +0100 >> >>> +++ >> >>> gdb-fsf-trunk-quilt/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S >> >>> 2014-10-02 07:58:10.978958268 +0100 >> >>> @@ -15,7 +15,8 @@ >> >>> >> >>> .text >> >>> .globl main >> >>> -main: .byte 0 >> >>> +main: >> >>> + .dc.l 0 >> >> >> >> We've never used .dl.l before, and I don't know how widely available >> >> it is (in fact, I couldn't find it in the GAS manual). How about using >> >> .word or .4byte? It would also be consistent with what we've usually be >> >> using. Would that work? >> > >> > Agreed. >> >> 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. > So I'll update the tests to use `.4byte'. Thanks for your review. Cool. I've got one more review coming.