public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Nick Alcock <nick.alcock@oracle.com>
To: Tom Tromey <tom@tromey.com>
Cc: binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: [PATCH v2 2/2 gdb] Fix --enable-libctf, --disable-static, and tests sans CTF-capable toolchain
Date: Wed, 16 Oct 2019 12:53:00 -0000	[thread overview]
Message-ID: <87imooam29.fsf@esperi.org.uk> (raw)
In-Reply-To: <87zhi1ok0n.fsf@tromey.com> (Tom Tromey's message of "Tue, 15 Oct	2019 14:01:44 -0600")

On 15 Oct 2019, Tom Tromey said:

>>>>>> "Nick" == Nick Alcock <nick.alcock@oracle.com> writes:
>
> Thanks for doing this.  This looks basically ok, just a few nits below.

Thanks for the review!

> The patch should have some intro text.  gdb style is to use the same
> text for the description in the email and for the commit.

I know: almost uniquely for me, I couldn't think of anything. :) I was
hoping you'd recommend something that wasn't literally repeating the
subject line...

(I also need to change things to cite the ChangeLog names in the commit
changelog text copy, rather than just the dir as binutils does.)

> Nick> +if test x${enable_static} = xno; then
> Nick> +  LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
>
> Indentation of 2 here...
> 
> Nick> +if test "${enable_libctf}" = yes; then
> Nick> +    AC_DEFINE(ENABLE_LIBCTF, 1, [Handle .ctf type-info sections])
>
> ... but 4 here.  I think they could be the same, whatever is most common
> in the file, or most common nearby anyhow.

Oops! You can tell I was editing several sorts of thing at once with
different indentatn levels: fixed.

> Nick> +#else
> Nick> +
> Nick> +void
> Nick> +_initialize_ctfread (void)
>
> gdb just uses "()", not "(void)" now.

Oh good! C++ to the rescue etc. Fixed. (And the other instance I copied
it from, further up in the file.)

> Nick> diff --git a/gdb/testsuite/configure.ac b/gdb/testsuite/configure.ac
> ... 
> Nick> +AC_ARG_ENABLE(libctf,
> Nick> +[AS_HELP_STRING([--enable-libctf], [Handle .ctf type-info sections])], [
>
> This seems to be identical to what's in gdb.
> 
> I don't really mind, but if you're duplicating this across several
> subdirectories, it may be better to stick a new macro into a new .m4 in
> config/, then use that everywhere.

I was thinking exactly the same thing last night. It's now duplicated in
four places, clearly way above any reasonable refactoring bound... I'll
adjust both patches in the series accordingly.

> Nick> +if {[skip_ctf_tests]} {
> Nick> +    return
> Nick> +}
>
> I think these spots should call "unsupported" to explain what happened.

I didn't notice that existed. Thank you, will do!

Something like

unsupported "No compiler CTF support, or CTF disabled in GDB"

I suppose.

> Nick> +proc skip_ctf_tests {} {
>
> I suspect you probably want to use gdb_caching_proc here.  This can be
> friendlier when running a lot of parallel tests, because it caches the
> result, and this proc is doing a compilation.

I was hoping something like this existed too. (You can tell I'm a newbie
to the GDB testsuite.)

Hm let's see if it has any special requirements... doesn't look like it,
other than that the output is unvarying.

New series coming soon. :) (Changes on the binutils side, as well, for
the --enable-libctf refactoring.)

      reply	other threads:[~2019-10-16 12:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 18:27 [PATCH v2 1/2] binutils, ld: work with --disable-libctf Nick Alcock
2019-10-09 18:27 ` [PATCH v2 2/2 gdb] Fix --enable-libctf, --disable-static, and tests sans CTF-capable toolchain Nick Alcock
2019-10-15 20:02   ` Tom Tromey
2019-10-16 12:53     ` Nick Alcock [this message]

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=87imooam29.fsf@esperi.org.uk \
    --to=nick.alcock@oracle.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).