This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH RFC] Add debuginfod support to objdump and readelf


>>>>> "Aaron" == Aaron Merey <amerey@redhat.com> writes:

Aaron> +# Enable debuginfod
Aaron> +AC_ARG_WITH([debuginfod],
Aaron> +        AC_HELP_STRING([--with-debuginfod],
Aaron> +                       [Enable debuginfo lookups with debuginfod (auto/yes/no)]),
Aaron> +        [], [with_debuginfod=auto])
Aaron> +AC_MSG_CHECKING([whether to use debuginfod])
Aaron> +AC_MSG_RESULT([$with_debuginfod])
Aaron> +
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])
Aaron> +  AC_CHECK_DECL([debuginfod_begin], [have_debuginfod_h=yes], [],
Aaron> +                [#include <elfutils/debuginfod.h>])
Aaron> +  if test "x$have_debuginfod_lib" = "xyes" -a \
Aaron> +          "x$have_debuginfod_h" = "xyes"; then
Aaron> +    AC_DEFINE([HAVE_LIBDEBUGINFOD], [1],
Aaron> +              [Define to 1 if debuginfod is enabled.])
Aaron> +    AC_SUBST([LIBDEBUGINFOD], ["-ldebuginfod"])
Aaron> +  else
Aaron> +    AC_SUBST([LIBDEBUGINFOD], [])
Aaron> +    if test "$with_debuginfod" = yes; then
Aaron> +      AC_MSG_ERROR([debuginfod is missing or unusable])
Aaron> +    else
Aaron> +      AC_MSG_WARN([debuginfod is missing or unusable; some features may be unavailable.])
Aaron> +    fi
Aaron> +  fi
Aaron> +fi

How does this relate to the gdb patch?  The two patches seem to do
similar things but use different configure options and different names.
Maybe I'm looking at an outdated version of the gdb patch?

Anyway, how about shipping a pkg-config file for the library so that
some of this configury can be removed?  Also, if the code is shared, how
about either putting it into BFD for reuse, or at least putting the
configury into a new .m4 file in config/ so that this can be reused?

thanks,
Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]