From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by sourceware.org (Postfix) with ESMTPS id A1CAA3857C59 for ; Fri, 17 Jul 2020 09:48:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A1CAA3857C59 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wm1-x342.google.com with SMTP id 22so14016751wmg.1 for ; Fri, 17 Jul 2020 02:48:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Q1BM8fxG6yyARvjfbYBe4o67C1oMku43ZhJAWvHNWuI=; b=AlOiO1huQT00Hw3zUj51+5S99i23qfHnxMIUE0bzTWJuVPIhDNgwOKoqvO0/MqrgOi tjVyLulFdF2mGhf5bExOMC77uff2qCTiJsctx/WoGpRD+tACXQ6tCFFQVSUhBKYWSZYj 9MP6bAqtVCC1h1tr0GbGPVrbSLY3UWfxBCJ+9ce15F+aZvEW6iDkqxcLgR+Jk9U7u2ZE 99Fo1vPnRRthEriy0YCY/90GfHF2UXzLYiIUs4zs3c431f/eaesrT6WS6cC1kOj924J8 W8Tw2lkPr4RPk53gP6qajj3TVmqaYm5ZfErwFswIKmHkhFb7JRN8RnEBWxb/cJanzhre f3yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Q1BM8fxG6yyARvjfbYBe4o67C1oMku43ZhJAWvHNWuI=; b=rCZhP0ppDQaLN+CKGtr6DMovF0Iztw2CUJntFUDgVRVyvbrV0dvhF8DpMsSfUcmK6d 825k+bsiL8ad8uPdM0OtVJupnmG8ZVEos7s9bJVsLjfROUYrn3x6GlqJIUEapeYDgilR ZScpRM8Emi9un6zXWaPS4PWnfAUmrUDu9yzFQKR7HvnG4qmgPT6VPEZKu5AXRTKZhGxM iKJ7G/XRVusqTWUSzzhh8/oUgyLmDrFGCV9s4HRe0hxnjgz9T+RSH6YkYix97r3Cd/IE uBqw2/m+dtAJnjTaXuboa0yTzw1dXyNw5b8luWjSauigj2TeiT5Bjg0EwV0BOyFBqgoQ h00g== X-Gm-Message-State: AOAM531BIrX/6+yyjcvM1lSknv3NnZAtEKRuRAhiXpEq0AUyH96ScRd8 1BnWmAAzAb8OvQwH1G4o1fwmDQ== X-Google-Smtp-Source: ABdhPJwWZut7GNYa8TVMiCKDWdhGujOcV4kefveNXejY3VTi65cBpp4mAwAfycTxk4x2sIcWGKrh/Q== X-Received: by 2002:a1c:2485:: with SMTP id k127mr8174387wmk.138.1594979337738; Fri, 17 Jul 2020 02:48:57 -0700 (PDT) Received: from localhost (host86-128-12-23.range86-128.btcentralplus.com. [86.128.12.23]) by smtp.gmail.com with ESMTPSA id j6sm13533323wro.25.2020.07.17.02.48.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jul 2020 02:48:56 -0700 (PDT) Date: Fri, 17 Jul 2020 10:48:55 +0100 From: Andrew Burgess To: Eric Christopher Cc: Caroline Tice , Eric Christopher , Simon Marchi , Tom Tromey , Joseph Myers , Caroline Tice via Gdb-patches Subject: Re: [PATCH] Update testsuite mechanism to allow object files as source files. Message-ID: <20200717094855.GL2737@embecosm.com> References: <87ft9rmd7c.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux/5.6.15-200.fc31.x86_64 (x86_64) X-Uptime: 10:44:23 up 38 days, 23:51, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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: Fri, 17 Jul 2020 09:49:00 -0000 * Eric Christopher via Gdb-patches [2020-07-16 14:16:46 -0700]: > Should be just gas in the binutils-gdb checkout? GDB's DWARF assembler is written in TCL, and generates a .S file containing the debug sections and their contents. A test will usually consist of some DWARF written in TCL and a C file. The C file is compiled without debug information and the TCL code then places references to symbols in the C file into the generated DWARF. The DWARF assembler then creates a .S file, which is assembled and linked with the C file. We then start up GDB and debug as normal. Thanks, Andrew > > -eric > > On Thu, Jul 16, 2020 at 2:10 PM Caroline Tice via Gdb-patches < > gdb-patches@sourceware.org> wrote: > > > 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 > >