This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 2/2] Correct invalid assumptions made by (mostly) DWARF-2 tests
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: Doug Evans <xdje42 at gmail dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Rich Fuhler <rich at mips dot com>, Richard Sandiford <rdsandiford at googlemail dot com>
- Date: Thu, 4 Dec 2014 00:24:31 +0000
- Subject: Re: [PATCH v2 2/2] Correct invalid assumptions made by (mostly) DWARF-2 tests
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 1 dot 10 dot 1204202134510 dot 19835 at tp dot orcam dot me dot uk> <20120611182043 dot GA7597 at adacore dot com> <alpine dot DEB dot 1 dot 10 dot 1409292313170 dot 4971 at tp dot orcam dot me dot uk> <alpine dot DEB dot 1 dot 10 dot 1410060021570 dot 19130 at tp dot orcam dot me dot uk> <20141116110934 dot GH5774 at adacore dot com> <CAP9bCMSKvBGREy_nXKRbA9E=7QsK1o-roENVms4yVWY4jJ4-8A at mail dot gmail dot com> <m38ujbylie dot fsf at sspiff dot org> <alpine dot DEB dot 1 dot 10 dot 1411161957100 dot 2881 at tp dot orcam dot me dot uk> <CAP9bCMSzD=b4NEBPJBb=f5RtmeCwUBVWbV=c3P0MSV04qB0ujw at mail dot gmail dot com>
On Sun, 16 Nov 2014, Doug Evans wrote:
> >> 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.
I stuck to the wrong assumption GAS is going to be used with test suite
runs, as if it was a part of GDB just as it is a part of binutils. It
is not, despite sharing the repository. While maybe less common these
days another assembler can be used by the compiler run in testing and
`.dc.l' can only be considered portable among GAS's targets and not
different assemblers. So we can't really use the pseudo-op, unlike
`.4byte' that we already rely on.
> > So I'll update the tests to use `.4byte'. Thanks for your review.
>
> Cool. I've got one more review coming.
Applied now, with the update requested and having regression-tested it.
Thanks again for the review.
Maciej