From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by sourceware.org (Postfix) with ESMTPS id 760C43857C58 for ; Thu, 16 Jul 2020 21:10:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 760C43857C58 Received: by mail-io1-xd41.google.com with SMTP id a12so7577757ion.13 for ; Thu, 16 Jul 2020 14:10:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6OL9dtty1wcopUNNp8L+01ZYnyshfwWGEkY8fm57tI0=; b=k3hydobs0A0l9pHsYQZPs0XRMnpuwq0kehhkNS4JQ1ubiqqt5e16fc0pnmaf+gC0dg C6N1X4sacL7LLaIj/qEq9OYApaiK1F6Q6/UtUODfvGWZ37wycqANLNROgOFDw5HGqqnl a5clRbhokjJn8tQbYdnMnqKjCdYm7BD71KghEw6JAwq24MnTXbde98mFR8TU1e70zh8a E0rxY1SvnA8EX5a4CQ7E6XAFvvlChEvNP2DfO9Q6hJWjrbWWa4/FI4iCJPGAWXh6nr7b NldDVr6xyhlu+xfT8BfcZdCP1HOxmPIfN/eaNuna3mKm7Mu3CrRxhLddUsEgtH3h8o/T qwhg== X-Gm-Message-State: AOAM5304cDyfaFneBCp7TURmkmcihggFxwSFeMWPashlfha0lovqDhDY /OnEl/SoSftegDK1xL+SLHElEqwLi0aqzbtR2gXT4A== X-Google-Smtp-Source: ABdhPJwuSZvbAmZGI9s9+XcA34f6L+uAf70PxnoAjN56LYFMk4lLrUVuuHt+xv9+KpL0FYEAwq+CnxazXOf0rAYpJA4= X-Received: by 2002:a6b:5c07:: with SMTP id z7mr6527507ioh.140.1594933836745; Thu, 16 Jul 2020 14:10:36 -0700 (PDT) MIME-Version: 1.0 References: <87ft9rmd7c.fsf@tromey.com> In-Reply-To: <87ft9rmd7c.fsf@tromey.com> From: Caroline Tice Date: Thu, 16 Jul 2020 14:10:25 -0700 Message-ID: Subject: Re: [PATCH] Update testsuite mechanism to allow object files as source files. To: Tom Tromey Cc: Joseph Myers , Caroline Tice via Gdb-patches , Eric Christopher , Simon Marchi Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-19.0 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 21:10:38 -0000 Has the DWARF assembler in the GDB testsuite been updated to handle DWARF v5? Or can it handle that automatically? Is there a good example I can look at to see how to use it? -- Caroline cmtice@google.com On Thu, Jul 16, 2020 at 1:12 PM Tom Tromey wrote: > > Joseph> On general free software and reproducible builds principles: > Joseph> * The source for any checked-in object file should be checked in. > Joseph> * That source should include comments giving all information required to > Joseph> be able to reproduce the object file byte-for-byte > > In the past we tried this kind of thing, by taking the assembly > generated by the compiler, then editing it and checking it in. > > However, IMO, this turned out to be a pain. The hand editing was often > not sufficiently documented, and the tests were still > architecture-dependent. Once or twice I think someone has had to edit > the .S file later, which is error-prone. Also, the earliest test suite > additions like this didn't include the original source, making this > harder to handle. > > The "DWARF assembler" in the test suite avoids all this, at least for > tests that require particular debuginfo. The main drawbacks of this > approach are (again IMO) that sometimes it's a pain to write the DWARF > by hand, and that sometimes the assembler framework itself needs > upgrades before one can even begin. However, the tests are much more > robust. > > I'd encourage the extension of the latter approach as much as possible. > It isn't perfect but IME has been better on the whole. > > Tom