From: Caroline Tice <cmtice@google.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: Eric Christopher <echristo@gmail.com>,
Eric Christopher <echristo@google.com>,
Simon Marchi <simark@simark.ca>, Tom Tromey <tom@tromey.com>,
Joseph Myers <joseph@codesourcery.com>,
Caroline Tice via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Update testsuite mechanism to allow object files as source files.
Date: Fri, 17 Jul 2020 09:05:59 -0700 [thread overview]
Message-ID: <CABtf2+TKzNAzd56CjC2g6MXDGCWxNASH4w0OTWi9cKrLYarNHQ@mail.gmail.com> (raw)
In-Reply-To: <20200717094855.GL2737@embecosm.com>
I've been able to generate/hand-edit a .S file for this test (thanks to
various people for help/suggestions). I will drop this object-file
approach and submit a new patch (on a new thread) with the .S file update.
Thanks everyone!
-- Caroline
cmtice@google.com
On Fri, Jul 17, 2020 at 2:48 AM Andrew Burgess <andrew.burgess@embecosm.com>
wrote:
> * Eric Christopher via Gdb-patches <gdb-patches@sourceware.org>
> [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 <tom@tromey.com> 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
> > >
>
next prev parent reply other threads:[~2020-07-17 16:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-16 16:50 Caroline Tice
2020-07-16 17:21 ` Andrew Burgess
2020-07-16 18:07 ` Caroline Tice
2020-07-16 18:29 ` Andrew Burgess
2020-07-16 17:33 ` Joseph Myers
2020-07-16 18:13 ` Caroline Tice
2020-07-16 18:47 ` Andrew Burgess
2020-07-16 20:35 ` Joseph Myers
2020-07-16 20:12 ` Tom Tromey
2020-07-16 21:10 ` Caroline Tice
2020-07-16 21:16 ` Eric Christopher
2020-07-17 9:48 ` Andrew Burgess
2020-07-17 16:05 ` Caroline Tice [this message]
2020-07-17 9:43 ` Andrew Burgess
2020-07-17 17:45 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABtf2+TKzNAzd56CjC2g6MXDGCWxNASH4w0OTWi9cKrLYarNHQ@mail.gmail.com \
--to=cmtice@google.com \
--cc=andrew.burgess@embecosm.com \
--cc=echristo@gmail.com \
--cc=echristo@google.com \
--cc=gdb-patches@sourceware.org \
--cc=joseph@codesourcery.com \
--cc=simark@simark.ca \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox