From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Eric Christopher <echristo@gmail.com>
Cc: Caroline Tice <cmtice@google.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 10:48:55 +0100 [thread overview]
Message-ID: <20200717094855.GL2737@embecosm.com> (raw)
In-Reply-To: <CALehDX4CNPzjnM+EOWMH7dsov8v_4Ror3zJMmB9Et3Dn-095ew@mail.gmail.com>
* 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 9:48 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 [this message]
2020-07-17 16:05 ` Caroline Tice
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=20200717094855.GL2737@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=cmtice@google.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