Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Aaron Merey <amerey@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/1] Add debuginfod support to GDB
Date: Thu, 09 Jan 2020 22:41:00 -0000	[thread overview]
Message-ID: <CAJDtP-Qz2bWFf5y775Pz8f=Dw5kCtcPqGUkoiZf8F9PsxW0z0Q@mail.gmail.com> (raw)
In-Reply-To: <87h814r6p4.fsf@tromey.com>

On Thu, Jan 9, 2020 at 10:27 AM Tom Tromey <tom@tromey.com> wrote:
> Aaron>         * config/debuginfod.m4: New file. Add macro AC_DEBUGINFOD.
> Aaron>         Adds new configure option --with-debuginfod.
> Aaron>         * configure: Regenerate.
> Aaron>         * configure.ac: Call AC_DEBUGINFOD.
>
> Does the top-level configure really need AC_DEBUGINFOD?
>
> If so, then this part of the patch has to go to gcc-patches first.
> But, I suspect it's not needed, in which case dropping it is more
> convenient, because we can have debuginfod.m4 locally and not involve
> gcc at all.

The reason for the top-level AC_DEBUGINFOD is to prevent the top-level
configure check from succeeding in cases where --with-debuginfod is
given but the debuginfod library or header cannot be found.

I should also mention that these same top level changes were also
included in a patch that adds debuginfod support to binutils and that
patch has been merged.

https://sourceware.org/ml/binutils/2020-01/msg00090.html

(I wasn't sure which list to post top-level changes to so I included
them in both patches so that each will work independently.)

> Aaron> +if test "${with_debuginfod}" = no; then
> Aaron> +  AC_MSG_WARN([debuginfod support disabled; some features may be unavailable.])
> Aaron> +else
> Aaron> +  AC_CHECK_LIB([debuginfod], [debuginfod_begin], [have_debuginfod_lib=yes])
>
> Does and/or should libdebuginfod use pkg-config for this kind of thing?

I can change this to use pkg-config.

>
> Aaron> @@ -612,7 +615,7 @@ CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(LIBCTF) $(ZLIB) \
> Aaron>          @LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \
> Aaron>          $(LIBEXPAT) $(LIBLZMA) $(LIBBABELTRACE) $(LIBIPT) \
> Aaron>          $(LIBIBERTY) $(WIN32LIBS) $(LIBGNU) $(LIBICONV) $(LIBMPFR) \
> Aaron> -        $(SRCHIGH_LIBS) $(LIBXXHASH) $(PTHREAD_LIBS)
> Aaron> +        $(SRCHIGH_LIBS) $(LIBXXHASH) $(PTHREAD_LIBS) $(LIBDEBUGINFOD)
>
> Should it be before PTHREAD_LIBS?
> If not, this is fine.

This should be ok.

> Aaron> +          /* Allow debuginfod to abort the download if SIGINT is raised.  */
> Aaron> +          debuginfod_set_progressfn(
>
> gdb style puts a space before the paren, and usually the paren is kept
> next to the arguments if a newline is needed.
>
> Aaron> +            client,
> Aaron> +            [] (debuginfod_client *c, long a, long b)
> Aaron> +              { return 1 ? check_quit_flag () : 0; }
>
> This looks weird, because there's no need for the "1 ?" part.  Maybe it
> should be just:
>
>     return check_quit_flag ();
>
> A lot of this code is duplicated in 3 places.  I think it would be
> better to have a helper function to consolidate the shared code.

Agreed, is gdb/gdbsupport/ a good place for this helper?

> Aaron> +# Copyright 2010-2019 Free Software Foundation, Inc.
>
> Probably just 2020.

Sure.


  parent reply	other threads:[~2020-01-09 22:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09  3:48 Aaron Merey
2020-01-09 13:48 ` Eli Zaretskii
     [not found] ` <87h814r6p4.fsf@tromey.com>
2020-01-09 22:41   ` Aaron Merey [this message]
2020-01-09 23:28     ` Christian Biesinger via gdb-patches
2020-01-10 16:32       ` Aaron Merey
     [not found]     ` <87tv53wfub.fsf@tromey.com>
2020-01-10 16:46       ` Aaron Merey
2020-01-10 18:43         ` 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='CAJDtP-Qz2bWFf5y775Pz8f=Dw5kCtcPqGUkoiZf8F9PsxW0z0Q@mail.gmail.com' \
    --to=amerey@redhat.com \
    --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