|
|
e1d87d |
Index: gdb-7.11.50.20160630/gdb/event-top.c
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.11.50.20160630.orig/gdb/event-top.c 2016-07-02 23:43:24.085214144 +0200
|
|
|
e1d87d |
+++ gdb-7.11.50.20160630/gdb/event-top.c 2016-07-03 14:37:12.572130734 +0200
|
|
|
e1d87d |
@@ -40,6 +40,7 @@
|
|
|
e1d87d |
#include "buffer.h"
|
|
|
e1d87d |
#include "ser-event.h"
|
|
|
e1d87d |
#include "gdb_select.h"
|
|
|
e1d87d |
+#include "symfile.h"
|
|
|
e1d87d |
|
|
|
e1d87d |
/* readline include files. */
|
|
|
e1d87d |
#include "readline/readline.h"
|
|
|
e1d87d |
@@ -347,6 +348,8 @@
|
|
|
e1d87d |
/* Reset the nesting depth used when trace-commands is set. */
|
|
|
e1d87d |
reset_command_nest_depth ();
|
|
|
e1d87d |
|
|
|
e1d87d |
+ debug_flush_missing ();
|
|
|
e1d87d |
+
|
|
|
e1d87d |
old_chain = make_cleanup (free_current_contents, &actual_gdb_prompt);
|
|
|
e1d87d |
|
|
|
e1d87d |
/* Do not call the python hook on an explicit prompt change as
|
|
|
e1d87d |
@@ -794,7 +797,10 @@
|
|
|
e1d87d |
command_handler (cmd);
|
|
|
e1d87d |
|
|
|
e1d87d |
if (ui->prompt_state != PROMPTED)
|
|
|
e1d87d |
- display_gdb_prompt (0);
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ debug_flush_missing ();
|
|
|
e1d87d |
+ display_gdb_prompt (0);
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
}
|
|
|
e1d87d |
}
|
|
|
e1d87d |
|
|
|
e1d87d |
Index: gdb-7.11.50.20160630/gdb/symfile.h
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.11.50.20160630.orig/gdb/symfile.h 2016-07-03 14:34:32.032753668 +0200
|
|
|
e1d87d |
+++ gdb-7.11.50.20160630/gdb/symfile.h 2016-07-03 14:37:12.573130742 +0200
|
|
|
e1d87d |
@@ -592,6 +592,8 @@
|
|
|
e1d87d |
/* build-id support. */
|
|
|
e1d87d |
extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr);
|
|
|
e1d87d |
extern void debug_print_missing (const char *binary, const char *debug);
|
|
|
e1d87d |
+extern void debug_flush_missing (void);
|
|
|
e1d87d |
+#define BUILD_ID_MAIN_EXECUTABLE_FILENAME _("the main executable file")
|
|
|
e1d87d |
|
|
|
e1d87d |
/* From dwarf2read.c */
|
|
|
e1d87d |
|
|
|
e1d87d |
Index: gdb-7.11.50.20160630/gdb/aclocal.m4
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.11.50.20160630.orig/gdb/aclocal.m4 2016-07-02 23:43:24.085214144 +0200
|
|
|
e1d87d |
+++ gdb-7.11.50.20160630/gdb/aclocal.m4 2016-07-03 14:37:12.576130768 +0200
|
|
|
e1d87d |
@@ -11,6 +11,221 @@
|
|
|
e1d87d |
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
|
e1d87d |
# PARTICULAR PURPOSE.
|
|
|
e1d87d |
|
|
|
e1d87d |
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
|
|
e1d87d |
+# serial 1 (pkg-config-0.24)
|
|
|
e1d87d |
+#
|
|
|
e1d87d |
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
|
|
e1d87d |
+#
|
|
|
e1d87d |
+# This program is free software; you can redistribute it and/or modify
|
|
|
e1d87d |
+# it under the terms of the GNU General Public License as published by
|
|
|
e1d87d |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
e1d87d |
+# (at your option) any later version.
|
|
|
e1d87d |
+#
|
|
|
e1d87d |
+# This program is distributed in the hope that it will be useful, but
|
|
|
e1d87d |
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
e1d87d |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
e1d87d |
+# General Public License for more details.
|
|
|
e1d87d |
+#
|
|
|
e1d87d |
+# You should have received a copy of the GNU General Public License
|
|
|
e1d87d |
+# along with this program; if not, write to the Free Software
|
|
|
e1d87d |
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
e1d87d |
+#
|
|
|
e1d87d |
+# As a special exception to the GNU General Public License, if you
|
|
|
e1d87d |
+# distribute this file as part of a program that contains a
|
|
|
e1d87d |
+# configuration script generated by Autoconf, you may include it under
|
|
|
e1d87d |
+# the same distribution terms that you use for the rest of that program.
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
|
|
e1d87d |
+# ----------------------------------
|
|
|
e1d87d |
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
|
|
e1d87d |
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
|
|
e1d87d |
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
|
|
e1d87d |
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
|
|
|
e1d87d |
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
|
|
e1d87d |
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
|
|
e1d87d |
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
|
|
e1d87d |
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+if test -n "$PKG_CONFIG"; then
|
|
|
e1d87d |
+ _pkg_min_version=m4_default([$1], [0.9.0])
|
|
|
e1d87d |
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
|
|
e1d87d |
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
|
|
e1d87d |
+ AC_MSG_RESULT([yes])
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ AC_MSG_RESULT([no])
|
|
|
e1d87d |
+ PKG_CONFIG=""
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+fi[]dnl
|
|
|
e1d87d |
+])# PKG_PROG_PKG_CONFIG
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
|
e1d87d |
+#
|
|
|
e1d87d |
+# Check to see whether a particular set of modules exists. Similar
|
|
|
e1d87d |
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
|
|
e1d87d |
+#
|
|
|
e1d87d |
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
|
|
e1d87d |
+# only at the first occurence in configure.ac, so if the first place
|
|
|
e1d87d |
+# it's called might be skipped (such as if it is within an "if", you
|
|
|
e1d87d |
+# have to call PKG_CHECK_EXISTS manually
|
|
|
e1d87d |
+# --------------------------------------------------------------
|
|
|
e1d87d |
+AC_DEFUN([PKG_CHECK_EXISTS],
|
|
|
e1d87d |
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
|
|
e1d87d |
+if test -n "$PKG_CONFIG" && \
|
|
|
e1d87d |
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
|
|
e1d87d |
+ m4_default([$2], [:])
|
|
|
e1d87d |
+m4_ifvaln([$3], [else
|
|
|
e1d87d |
+ $3])dnl
|
|
|
e1d87d |
+fi])
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
|
|
e1d87d |
+# ---------------------------------------------
|
|
|
e1d87d |
+m4_define([_PKG_CONFIG],
|
|
|
e1d87d |
+[if test -n "$$1"; then
|
|
|
e1d87d |
+ pkg_cv_[]$1="$$1"
|
|
|
e1d87d |
+ elif test -n "$PKG_CONFIG"; then
|
|
|
e1d87d |
+ PKG_CHECK_EXISTS([$3],
|
|
|
e1d87d |
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
|
|
|
e1d87d |
+ test "x$?" != "x0" && pkg_failed=yes ],
|
|
|
e1d87d |
+ [pkg_failed=yes])
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ pkg_failed=untried
|
|
|
e1d87d |
+fi[]dnl
|
|
|
e1d87d |
+])# _PKG_CONFIG
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+# _PKG_SHORT_ERRORS_SUPPORTED
|
|
|
e1d87d |
+# -----------------------------
|
|
|
e1d87d |
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
|
|
e1d87d |
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
|
|
e1d87d |
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
|
|
e1d87d |
+ _pkg_short_errors_supported=yes
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+ _pkg_short_errors_supported=no
|
|
|
e1d87d |
+fi[]dnl
|
|
|
e1d87d |
+])# _PKG_SHORT_ERRORS_SUPPORTED
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
|
|
e1d87d |
+# [ACTION-IF-NOT-FOUND])
|
|
|
e1d87d |
+#
|
|
|
e1d87d |
+#
|
|
|
e1d87d |
+# Note that if there is a possibility the first call to
|
|
|
e1d87d |
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
|
|
|
e1d87d |
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
|
|
e1d87d |
+#
|
|
|
e1d87d |
+#
|
|
|
e1d87d |
+# --------------------------------------------------------------
|
|
|
e1d87d |
+AC_DEFUN([PKG_CHECK_MODULES],
|
|
|
e1d87d |
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
|
|
e1d87d |
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
|
|
e1d87d |
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+pkg_failed=no
|
|
|
e1d87d |
+AC_MSG_CHECKING([for $1])
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
|
|
e1d87d |
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
|
|
e1d87d |
+and $1[]_LIBS to avoid the need to call pkg-config.
|
|
|
e1d87d |
+See the pkg-config man page for more details.])
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+if test $pkg_failed = yes; then
|
|
|
e1d87d |
+ AC_MSG_RESULT([no])
|
|
|
e1d87d |
+ _PKG_SHORT_ERRORS_SUPPORTED
|
|
|
e1d87d |
+ if test $_pkg_short_errors_supported = yes; then
|
|
|
e1d87d |
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+ # Put the nasty error message in config.log where it belongs
|
|
|
e1d87d |
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ m4_default([$4], [AC_MSG_ERROR(
|
|
|
e1d87d |
+[Package requirements ($2) were not met:
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+$$1_PKG_ERRORS
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
|
|
e1d87d |
+installed software in a non-standard prefix.
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+_PKG_TEXT])[]dnl
|
|
|
e1d87d |
+ ])
|
|
|
e1d87d |
+elif test $pkg_failed = untried; then
|
|
|
e1d87d |
+ AC_MSG_RESULT([no])
|
|
|
e1d87d |
+ m4_default([$4], [AC_MSG_FAILURE(
|
|
|
e1d87d |
+[The pkg-config script could not be found or is too old. Make sure it
|
|
|
e1d87d |
+is in your PATH or set the PKG_CONFIG environment variable to the full
|
|
|
e1d87d |
+path to pkg-config.
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+_PKG_TEXT
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
|
|
|
e1d87d |
+ ])
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
|
|
e1d87d |
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
|
|
e1d87d |
+ AC_MSG_RESULT([yes])
|
|
|
e1d87d |
+ $3
|
|
|
e1d87d |
+fi[]dnl
|
|
|
e1d87d |
+])# PKG_CHECK_MODULES
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+# PKG_INSTALLDIR(DIRECTORY)
|
|
|
e1d87d |
+# -------------------------
|
|
|
e1d87d |
+# Substitutes the variable pkgconfigdir as the location where a module
|
|
|
e1d87d |
+# should install pkg-config .pc files. By default the directory is
|
|
|
e1d87d |
+# $libdir/pkgconfig, but the default can be changed by passing
|
|
|
e1d87d |
+# DIRECTORY. The user can override through the --with-pkgconfigdir
|
|
|
e1d87d |
+# parameter.
|
|
|
e1d87d |
+AC_DEFUN([PKG_INSTALLDIR],
|
|
|
e1d87d |
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
|
|
e1d87d |
+m4_pushdef([pkg_description],
|
|
|
e1d87d |
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
|
|
|
e1d87d |
+AC_ARG_WITH([pkgconfigdir],
|
|
|
e1d87d |
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
|
|
|
e1d87d |
+ [with_pkgconfigdir=]pkg_default)
|
|
|
e1d87d |
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
|
|
e1d87d |
+m4_popdef([pkg_default])
|
|
|
e1d87d |
+m4_popdef([pkg_description])
|
|
|
e1d87d |
+]) dnl PKG_INSTALLDIR
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+# PKG_NOARCH_INSTALLDIR(DIRECTORY)
|
|
|
e1d87d |
+# -------------------------
|
|
|
e1d87d |
+# Substitutes the variable noarch_pkgconfigdir as the location where a
|
|
|
e1d87d |
+# module should install arch-independent pkg-config .pc files. By
|
|
|
e1d87d |
+# default the directory is $datadir/pkgconfig, but the default can be
|
|
|
e1d87d |
+# changed by passing DIRECTORY. The user can override through the
|
|
|
e1d87d |
+# --with-noarch-pkgconfigdir parameter.
|
|
|
e1d87d |
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
|
|
e1d87d |
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
|
|
e1d87d |
+m4_pushdef([pkg_description],
|
|
|
e1d87d |
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
|
|
|
e1d87d |
+AC_ARG_WITH([noarch-pkgconfigdir],
|
|
|
e1d87d |
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
|
|
|
e1d87d |
+ [with_noarch_pkgconfigdir=]pkg_default)
|
|
|
e1d87d |
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
|
|
e1d87d |
+m4_popdef([pkg_default])
|
|
|
e1d87d |
+m4_popdef([pkg_description])
|
|
|
e1d87d |
+]) dnl PKG_NOARCH_INSTALLDIR
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
|
|
|
e1d87d |
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
|
e1d87d |
+# -------------------------------------------
|
|
|
e1d87d |
+# Retrieves the value of the pkg-config variable for the given module.
|
|
|
e1d87d |
+AC_DEFUN([PKG_CHECK_VAR],
|
|
|
e1d87d |
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
|
|
e1d87d |
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
|
|
|
e1d87d |
+AS_VAR_COPY([$1], [pkg_cv_][$1])
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
|
|
e1d87d |
+])# PKG_CHECK_VAR
|
|
|
e1d87d |
+
|
|
|
e1d87d |
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
|
|
e1d87d |
|
|
|
e1d87d |
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
|
|
e1d87d |
Index: gdb-7.11.50.20160630/gdb/config.in
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.11.50.20160630.orig/gdb/config.in 2016-07-02 23:43:24.085214144 +0200
|
|
|
e1d87d |
+++ gdb-7.11.50.20160630/gdb/config.in 2016-07-03 14:37:12.576130768 +0200
|
|
|
e1d87d |
@@ -33,6 +33,9 @@
|
|
|
e1d87d |
/* Define to BFD's default target vector. */
|
|
|
e1d87d |
#undef DEFAULT_BFD_VEC
|
|
|
e1d87d |
|
|
|
e1d87d |
+/* librpm version specific library name to dlopen. */
|
|
|
e1d87d |
+#undef DLOPEN_LIBRPM
|
|
|
e1d87d |
+
|
|
|
e1d87d |
/* Define to 1 if translation of program messages to the user's native
|
|
|
e1d87d |
language is requested. */
|
|
|
e1d87d |
#undef ENABLE_NLS
|
|
|
e1d87d |
@@ -261,6 +264,9 @@
|
|
|
e1d87d |
/* Define if Python 2.7 is being used. */
|
|
|
e1d87d |
#undef HAVE_LIBPYTHON2_7
|
|
|
e1d87d |
|
|
|
e1d87d |
+/* Define if librpm library is being used. */
|
|
|
e1d87d |
+#undef HAVE_LIBRPM
|
|
|
e1d87d |
+
|
|
|
e1d87d |
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
|
|
|
e1d87d |
#undef HAVE_LIBUNWIND_IA64_H
|
|
|
e1d87d |
|
|
|
e1d87d |
Index: gdb-7.11.50.20160630/gdb/configure
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.11.50.20160630.orig/gdb/configure 2016-07-02 23:43:24.085214144 +0200
|
|
|
e1d87d |
+++ gdb-7.11.50.20160630/gdb/configure 2016-07-03 14:37:12.581130811 +0200
|
|
|
e1d87d |
@@ -705,6 +705,11 @@
|
|
|
e1d87d |
HAVE_NATIVE_GCORE_TARGET
|
|
|
e1d87d |
TARGET_OBS
|
|
|
e1d87d |
subdirs
|
|
|
e1d87d |
+RPM_LIBS
|
|
|
e1d87d |
+RPM_CFLAGS
|
|
|
e1d87d |
+PKG_CONFIG_LIBDIR
|
|
|
e1d87d |
+PKG_CONFIG_PATH
|
|
|
e1d87d |
+PKG_CONFIG
|
|
|
e1d87d |
GDB_DATADIR
|
|
|
e1d87d |
DEBUGDIR
|
|
|
e1d87d |
MAKEINFO_EXTRA_FLAGS
|
|
|
e1d87d |
@@ -814,6 +819,7 @@
|
|
|
e1d87d |
with_relocated_sources
|
|
|
e1d87d |
with_auto_load_dir
|
|
|
e1d87d |
with_auto_load_safe_path
|
|
|
e1d87d |
+with_rpm
|
|
|
e1d87d |
enable_targets
|
|
|
e1d87d |
enable_64_bit_bfd
|
|
|
e1d87d |
enable_gdbcli
|
|
|
e1d87d |
@@ -870,6 +876,11 @@
|
|
|
e1d87d |
CPP
|
|
|
e1d87d |
MAKEINFO
|
|
|
e1d87d |
MAKEINFOFLAGS
|
|
|
e1d87d |
+PKG_CONFIG
|
|
|
e1d87d |
+PKG_CONFIG_PATH
|
|
|
e1d87d |
+PKG_CONFIG_LIBDIR
|
|
|
e1d87d |
+RPM_CFLAGS
|
|
|
e1d87d |
+RPM_LIBS
|
|
|
e1d87d |
YACC
|
|
|
e1d87d |
YFLAGS
|
|
|
e1d87d |
XMKMF'
|
|
|
e1d87d |
@@ -1541,6 +1552,8 @@
|
|
|
e1d87d |
[--with-auto-load-dir]
|
|
|
e1d87d |
--without-auto-load-safe-path
|
|
|
e1d87d |
do not restrict auto-loaded files locations
|
|
|
e1d87d |
+ --with-rpm query rpm database for missing debuginfos (yes/no,
|
|
|
e1d87d |
+ def. auto=librpm.so)
|
|
|
e1d87d |
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
|
|
|
e1d87d |
--with-curses use the curses library instead of the termcap
|
|
|
e1d87d |
library
|
|
|
e1d87d |
@@ -1595,6 +1608,13 @@
|
|
|
e1d87d |
MAKEINFO Parent configure detects if it is of sufficient version.
|
|
|
e1d87d |
MAKEINFOFLAGS
|
|
|
e1d87d |
Parameters for MAKEINFO.
|
|
|
e1d87d |
+ PKG_CONFIG path to pkg-config utility
|
|
|
e1d87d |
+ PKG_CONFIG_PATH
|
|
|
e1d87d |
+ directories to add to pkg-config's search path
|
|
|
e1d87d |
+ PKG_CONFIG_LIBDIR
|
|
|
e1d87d |
+ path overriding pkg-config's built-in search path
|
|
|
e1d87d |
+ RPM_CFLAGS C compiler flags for RPM, overriding pkg-config
|
|
|
e1d87d |
+ RPM_LIBS linker flags for RPM, overriding pkg-config
|
|
|
e1d87d |
YACC The `Yet Another C Compiler' implementation to use. Defaults to
|
|
|
e1d87d |
the first program found out of: `bison -y', `byacc', `yacc'.
|
|
|
e1d87d |
YFLAGS The list of arguments that will be passed by default to $YACC.
|
|
|
e1d87d |
@@ -5613,6 +5633,494 @@
|
|
|
e1d87d |
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
|
|
|
e1d87d |
$as_echo "$with_auto_load_safe_path" >&6; }
|
|
|
e1d87d |
|
|
|
e1d87d |
+# Integration with rpm library to support missing debuginfo suggestions.
|
|
|
e1d87d |
+# --without-rpm: Disable any rpm support.
|
|
|
e1d87d |
+# --with-rpm=libname.so: Try to dynamically open `libname.so' during runtime.
|
|
|
e1d87d |
+# Even with runtime missing `libname.so' GDB will still other run correctly.
|
|
|
e1d87d |
+# Missing `libname.so' during ./configure will abort the configuration.
|
|
|
e1d87d |
+# --with-rpm=librpm.so: Like `--with-rpm=libname.so' but try to find specific
|
|
|
e1d87d |
+# minor version first such as `librpm-4.6.so' as minor version differences
|
|
|
e1d87d |
+# mean API+ABI incompatibility. If the specific match versioned library name
|
|
|
e1d87d |
+# could not be found still open dynamically at least `librpm.so'.
|
|
|
e1d87d |
+# --with-rpm: Like `--with-rpm=librpm.so' but if any of its detection fails try
|
|
|
e1d87d |
+# to find librpm for compilation-time linking by pkg-config. GDB binary will
|
|
|
e1d87d |
+# be probably linked with the version specific library (as `librpm-4.6.so').
|
|
|
e1d87d |
+# Failure to find librpm by pkg-config will abort the configuration.
|
|
|
e1d87d |
+# (default) --with-rpm=auto: Like `--with-rpm=librpm.so' but if even pkg-config
|
|
|
e1d87d |
+# cannot find librpm use to the rpmless compilation (like `--without-rpm').
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+# Check whether --with-rpm was given.
|
|
|
e1d87d |
+if test "${with_rpm+set}" = set; then :
|
|
|
e1d87d |
+ withval=$with_rpm;
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+ with_rpm="auto"
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+if test "x$with_rpm" != "xno"; then
|
|
|
e1d87d |
+ if test "x$with_rpm" = "xyes"; then
|
|
|
e1d87d |
+ LIBRPM="librpm.so"
|
|
|
e1d87d |
+ RPM_REQUIRE=true
|
|
|
e1d87d |
+ DLOPEN_REQUIRE=false
|
|
|
e1d87d |
+ elif test "x$with_rpm" = "xauto"; then
|
|
|
e1d87d |
+ LIBRPM="librpm.so"
|
|
|
e1d87d |
+ RPM_REQUIRE=false
|
|
|
e1d87d |
+ DLOPEN_REQUIRE=false
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ LIBRPM="$with_rpm"
|
|
|
e1d87d |
+ RPM_REQUIRE=true
|
|
|
e1d87d |
+ DLOPEN_REQUIRE=true
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+ LIBRPM_STRING='"'"$LIBRPM"'"'
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking specific librpm version" >&5
|
|
|
e1d87d |
+$as_echo_n "checking specific librpm version... " >&6; }
|
|
|
e1d87d |
+ HAVE_DLOPEN_LIBRPM=false
|
|
|
e1d87d |
+ save_LIBS="$LIBS"
|
|
|
e1d87d |
+ LIBS="$LIBS -ldl"
|
|
|
e1d87d |
+ if test "$cross_compiling" = yes; then :
|
|
|
e1d87d |
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
|
|
e1d87d |
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
|
|
e1d87d |
+as_fn_error "cannot run test program while cross compiling
|
|
|
e1d87d |
+See \`config.log' for more details." "$LINENO" 5; }
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
e1d87d |
+/* end confdefs.h. */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+#include <rpm/rpmlib.h>
|
|
|
e1d87d |
+#include <dlfcn.h>
|
|
|
e1d87d |
+#include <errno.h>
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+int
|
|
|
e1d87d |
+main ()
|
|
|
e1d87d |
+{
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ void *h;
|
|
|
e1d87d |
+ const char *const *rpmverp;
|
|
|
e1d87d |
+ FILE *f;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ f = fopen ("conftest.out", "w");
|
|
|
e1d87d |
+ if (!f)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ fprintf (stderr, "Cannot write \"%s\": %s\n", "conftest.out",
|
|
|
e1d87d |
+ strerror (errno));
|
|
|
e1d87d |
+ return 1;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ h = dlopen ($LIBRPM_STRING, RTLD_LAZY);
|
|
|
e1d87d |
+ if (!h)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ fprintf (stderr, "dlopen (\"%s\"): %s\n", $LIBRPM_STRING, dlerror ());
|
|
|
e1d87d |
+ return 1;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ rpmverp = dlsym (h, "RPMVERSION");
|
|
|
e1d87d |
+ if (!rpmverp)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ fprintf (stderr, "dlsym (\"RPMVERSION\"): %s\n", dlerror ());
|
|
|
e1d87d |
+ return 1;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ fprintf (stderr, "RPMVERSION is: \"");
|
|
|
e1d87d |
+ fprintf (stderr, "%s\"\n", *rpmverp);
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ /* Try to find the specific librpm version only for "librpm.so" as we do
|
|
|
e1d87d |
+ not know how to assemble the version string otherwise. */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if (strcmp ("librpm.so", $LIBRPM_STRING) != 0)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ fprintf (f, "%s\n", $LIBRPM_STRING);
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ char *h2_name;
|
|
|
e1d87d |
+ void *h2;
|
|
|
e1d87d |
+ int major, minor;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if (sscanf (*rpmverp, "%d.%d", &major, &minor) != 2)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ fprintf (stderr, "Unable to parse RPMVERSION.\n");
|
|
|
e1d87d |
+ fprintf (f, "%s\n", $LIBRPM_STRING);
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ /* Avoid the square brackets by malloc. */
|
|
|
e1d87d |
+ h2_name = malloc (64);
|
|
|
e1d87d |
+ sprintf (h2_name, "librpm-%d.%d.so", major, minor);
|
|
|
e1d87d |
+ h2 = dlopen (h2_name, RTLD_LAZY);
|
|
|
e1d87d |
+ if (!h2)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ fprintf (stderr, "dlopen (\"%s\"): %s\n", h2_name, dlerror ());
|
|
|
e1d87d |
+ fprintf (f, "%s\n", $LIBRPM_STRING);
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ if (h2 != h)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ fprintf (stderr, "dlopen of \"%s\" and \"%s\" are different.\n",
|
|
|
e1d87d |
+ $LIBRPM_STRING, h2_name);
|
|
|
e1d87d |
+ fprintf (f, "%s\n", $LIBRPM_STRING);
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ /* Found the valid .so name with a specific version. */
|
|
|
e1d87d |
+ fprintf (f, "%s\n", h2_name);
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ ;
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+}
|
|
|
e1d87d |
+_ACEOF
|
|
|
e1d87d |
+if ac_fn_c_try_run "$LINENO"; then :
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ DLOPEN_LIBRPM="`cat conftest.out`"
|
|
|
e1d87d |
+ if test "x$DLOPEN_LIBRPM" != "x"; then
|
|
|
e1d87d |
+ HAVE_DLOPEN_LIBRPM=true
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLOPEN_LIBRPM" >&5
|
|
|
e1d87d |
+$as_echo "$DLOPEN_LIBRPM" >&6; }
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
|
|
e1d87d |
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ rm -f conftest.out
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if $HAVE_DLOPEN_LIBRPM; then
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking rpm library API compatibility" >&5
|
|
|
e1d87d |
+$as_echo_n "checking rpm library API compatibility... " >&6; }
|
|
|
e1d87d |
+ # The compilation requires -Werror to verify anything.
|
|
|
e1d87d |
+ save_CFLAGS="$CFLAGS"
|
|
|
e1d87d |
+ CFLAGS="$CFLAGS -Werror"
|
|
|
e1d87d |
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
e1d87d |
+/* end confdefs.h. */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+/* Duplicate here the declarations to verify they match "elfread.c". */
|
|
|
e1d87d |
+#include <rpm/rpmlib.h>
|
|
|
e1d87d |
+#include <rpm/rpmts.h>
|
|
|
e1d87d |
+#include <rpm/rpmdb.h>
|
|
|
e1d87d |
+#include <rpm/header.h>
|
|
|
e1d87d |
+extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg);
|
|
|
e1d87d |
+extern int rpmReadConfigFiles(const char * file, const char * target);
|
|
|
e1d87d |
+extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi);
|
|
|
e1d87d |
+extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
|
|
|
e1d87d |
+extern rpmts rpmtsCreate(void);
|
|
|
e1d87d |
+extern rpmts rpmtsFree(rpmts ts);
|
|
|
e1d87d |
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
|
|
e1d87d |
+ const void * keyp, size_t keylen);
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+int
|
|
|
e1d87d |
+main ()
|
|
|
e1d87d |
+{
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ ;
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+}
|
|
|
e1d87d |
+_ACEOF
|
|
|
e1d87d |
+if ac_fn_c_try_compile "$LINENO"; then :
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ LIBRPM_COMPAT=true
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
|
e1d87d |
+$as_echo "yes" >&6; }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ LIBRPM_COMPAT=false
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
e1d87d |
+$as_echo "no" >&6; }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
|
e1d87d |
+ CFLAGS="$save_CFLAGS"
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if ! $LIBRPM_COMPAT; then
|
|
|
e1d87d |
+ HAVE_DLOPEN_LIBRPM=false
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if $HAVE_DLOPEN_LIBRPM; then
|
|
|
e1d87d |
+ DLOPEN_LIBRPM_STRING='"'"$DLOPEN_LIBRPM"'"'
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+cat >>confdefs.h <<_ACEOF
|
|
|
e1d87d |
+#define DLOPEN_LIBRPM $DLOPEN_LIBRPM_STRING
|
|
|
e1d87d |
+_ACEOF
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+$as_echo "#define HAVE_LIBRPM 1" >>confdefs.h
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
e1d87d |
+$as_echo "no" >&6; }
|
|
|
e1d87d |
+ LIBS="$save_LIBS"
|
|
|
e1d87d |
+ if $DLOPEN_REQUIRE; then
|
|
|
e1d87d |
+ as_fn_error "Specific name $LIBRPM was requested but it could not be opened." "$LINENO" 5
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
|
|
e1d87d |
+ if test -n "$ac_tool_prefix"; then
|
|
|
e1d87d |
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
|
|
|
e1d87d |
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
|
|
|
e1d87d |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
|
e1d87d |
+$as_echo_n "checking for $ac_word... " >&6; }
|
|
|
e1d87d |
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
|
|
|
e1d87d |
+ $as_echo_n "(cached) " >&6
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+ case $PKG_CONFIG in
|
|
|
e1d87d |
+ [\\/]* | ?:[\\/]*)
|
|
|
e1d87d |
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
|
|
|
e1d87d |
+ ;;
|
|
|
e1d87d |
+ *)
|
|
|
e1d87d |
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
|
e1d87d |
+for as_dir in $PATH
|
|
|
e1d87d |
+do
|
|
|
e1d87d |
+ IFS=$as_save_IFS
|
|
|
e1d87d |
+ test -z "$as_dir" && as_dir=.
|
|
|
e1d87d |
+ for ac_exec_ext in '' $ac_executable_extensions; do
|
|
|
e1d87d |
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
|
|
e1d87d |
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
|
|
|
e1d87d |
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
|
e1d87d |
+ break 2
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+done
|
|
|
e1d87d |
+ done
|
|
|
e1d87d |
+IFS=$as_save_IFS
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ ;;
|
|
|
e1d87d |
+esac
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
|
|
|
e1d87d |
+if test -n "$PKG_CONFIG"; then
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
|
|
|
e1d87d |
+$as_echo "$PKG_CONFIG" >&6; }
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
e1d87d |
+$as_echo "no" >&6; }
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+if test -z "$ac_cv_path_PKG_CONFIG"; then
|
|
|
e1d87d |
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
|
|
|
e1d87d |
+ # Extract the first word of "pkg-config", so it can be a program name with args.
|
|
|
e1d87d |
+set dummy pkg-config; ac_word=$2
|
|
|
e1d87d |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
|
e1d87d |
+$as_echo_n "checking for $ac_word... " >&6; }
|
|
|
e1d87d |
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
|
|
|
e1d87d |
+ $as_echo_n "(cached) " >&6
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+ case $ac_pt_PKG_CONFIG in
|
|
|
e1d87d |
+ [\\/]* | ?:[\\/]*)
|
|
|
e1d87d |
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
|
|
|
e1d87d |
+ ;;
|
|
|
e1d87d |
+ *)
|
|
|
e1d87d |
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
|
e1d87d |
+for as_dir in $PATH
|
|
|
e1d87d |
+do
|
|
|
e1d87d |
+ IFS=$as_save_IFS
|
|
|
e1d87d |
+ test -z "$as_dir" && as_dir=.
|
|
|
e1d87d |
+ for ac_exec_ext in '' $ac_executable_extensions; do
|
|
|
e1d87d |
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
|
|
e1d87d |
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
|
|
|
e1d87d |
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
|
e1d87d |
+ break 2
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+done
|
|
|
e1d87d |
+ done
|
|
|
e1d87d |
+IFS=$as_save_IFS
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ ;;
|
|
|
e1d87d |
+esac
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
|
|
|
e1d87d |
+if test -n "$ac_pt_PKG_CONFIG"; then
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
|
|
|
e1d87d |
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
e1d87d |
+$as_echo "no" >&6; }
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if test "x$ac_pt_PKG_CONFIG" = x; then
|
|
|
e1d87d |
+ PKG_CONFIG=""
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ case $cross_compiling:$ac_tool_warned in
|
|
|
e1d87d |
+yes:)
|
|
|
e1d87d |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
|
|
e1d87d |
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
|
|
e1d87d |
+ac_tool_warned=yes ;;
|
|
|
e1d87d |
+esac
|
|
|
e1d87d |
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+if test -n "$PKG_CONFIG"; then
|
|
|
e1d87d |
+ _pkg_min_version=0.9.0
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
|
|
|
e1d87d |
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
|
|
|
e1d87d |
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
|
e1d87d |
+$as_echo "yes" >&6; }
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
e1d87d |
+$as_echo "no" >&6; }
|
|
|
e1d87d |
+ PKG_CONFIG=""
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+pkg_failed=no
|
|
|
e1d87d |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RPM" >&5
|
|
|
e1d87d |
+$as_echo_n "checking for RPM... " >&6; }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+if test -n "$RPM_CFLAGS"; then
|
|
|
e1d87d |
+ pkg_cv_RPM_CFLAGS="$RPM_CFLAGS"
|
|
|
e1d87d |
+ elif test -n "$PKG_CONFIG"; then
|
|
|
e1d87d |
+ if test -n "$PKG_CONFIG" && \
|
|
|
e1d87d |
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rpm\""; } >&5
|
|
|
e1d87d |
+ ($PKG_CONFIG --exists --print-errors "rpm") 2>&5
|
|
|
e1d87d |
+ ac_status=$?
|
|
|
e1d87d |
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
|
|
e1d87d |
+ test $ac_status = 0; }; then
|
|
|
e1d87d |
+ pkg_cv_RPM_CFLAGS=`$PKG_CONFIG --cflags "rpm" 2>/dev/null`
|
|
|
e1d87d |
+ test "x$?" != "x0" && pkg_failed=yes
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+ pkg_failed=yes
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ pkg_failed=untried
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+if test -n "$RPM_LIBS"; then
|
|
|
e1d87d |
+ pkg_cv_RPM_LIBS="$RPM_LIBS"
|
|
|
e1d87d |
+ elif test -n "$PKG_CONFIG"; then
|
|
|
e1d87d |
+ if test -n "$PKG_CONFIG" && \
|
|
|
e1d87d |
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rpm\""; } >&5
|
|
|
e1d87d |
+ ($PKG_CONFIG --exists --print-errors "rpm") 2>&5
|
|
|
e1d87d |
+ ac_status=$?
|
|
|
e1d87d |
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
|
|
e1d87d |
+ test $ac_status = 0; }; then
|
|
|
e1d87d |
+ pkg_cv_RPM_LIBS=`$PKG_CONFIG --libs "rpm" 2>/dev/null`
|
|
|
e1d87d |
+ test "x$?" != "x0" && pkg_failed=yes
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+ pkg_failed=yes
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ pkg_failed=untried
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+if test $pkg_failed = yes; then
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
e1d87d |
+$as_echo "no" >&6; }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
|
|
e1d87d |
+ _pkg_short_errors_supported=yes
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+ _pkg_short_errors_supported=no
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+ if test $_pkg_short_errors_supported = yes; then
|
|
|
e1d87d |
+ RPM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "rpm" 2>&1`
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ RPM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "rpm" 2>&1`
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+ # Put the nasty error message in config.log where it belongs
|
|
|
e1d87d |
+ echo "$RPM_PKG_ERRORS" >&5
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ HAVE_LIBRPM=false
|
|
|
e1d87d |
+elif test $pkg_failed = untried; then
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
e1d87d |
+$as_echo "no" >&6; }
|
|
|
e1d87d |
+ HAVE_LIBRPM=false
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+ RPM_CFLAGS=$pkg_cv_RPM_CFLAGS
|
|
|
e1d87d |
+ RPM_LIBS=$pkg_cv_RPM_LIBS
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
|
e1d87d |
+$as_echo "yes" >&6; }
|
|
|
e1d87d |
+ HAVE_LIBRPM=true
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if $HAVE_LIBRPM; then
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking rpm library API compatibility" >&5
|
|
|
e1d87d |
+$as_echo_n "checking rpm library API compatibility... " >&6; }
|
|
|
e1d87d |
+ # The compilation requires -Werror to verify anything.
|
|
|
e1d87d |
+ save_CFLAGS="$CFLAGS"
|
|
|
e1d87d |
+ CFLAGS="$CFLAGS -Werror"
|
|
|
e1d87d |
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
e1d87d |
+/* end confdefs.h. */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+/* Duplicate here the declarations to verify they match "elfread.c". */
|
|
|
e1d87d |
+#include <rpm/rpmlib.h>
|
|
|
e1d87d |
+#include <rpm/rpmts.h>
|
|
|
e1d87d |
+#include <rpm/rpmdb.h>
|
|
|
e1d87d |
+#include <rpm/header.h>
|
|
|
e1d87d |
+extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg);
|
|
|
e1d87d |
+extern int rpmReadConfigFiles(const char * file, const char * target);
|
|
|
e1d87d |
+extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi);
|
|
|
e1d87d |
+extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
|
|
|
e1d87d |
+extern rpmts rpmtsCreate(void);
|
|
|
e1d87d |
+extern rpmts rpmtsFree(rpmts ts);
|
|
|
e1d87d |
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
|
|
e1d87d |
+ const void * keyp, size_t keylen);
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+int
|
|
|
e1d87d |
+main ()
|
|
|
e1d87d |
+{
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ ;
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+}
|
|
|
e1d87d |
+_ACEOF
|
|
|
e1d87d |
+if ac_fn_c_try_compile "$LINENO"; then :
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ LIBRPM_COMPAT=true
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
|
e1d87d |
+$as_echo "yes" >&6; }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+else
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ LIBRPM_COMPAT=false
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
e1d87d |
+$as_echo "no" >&6; }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
|
e1d87d |
+ CFLAGS="$save_CFLAGS"
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if ! $LIBRPM_COMPAT; then
|
|
|
e1d87d |
+ HAVE_LIBRPM=false
|
|
|
e1d87d |
+ RPM_PKG_ERRORS="Found $LIBRPM API is incompatibile with this GDB"
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if $HAVE_LIBRPM; then
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+$as_echo "#define HAVE_LIBRPM 1" >>confdefs.h
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ CFLAGS="$CFLAGS $RPM_CFLAGS"
|
|
|
e1d87d |
+ LIBS="$LIBS $RPM_LIBS"
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ if $RPM_REQUIRE; then
|
|
|
e1d87d |
+ as_fn_error "$RPM_PKG_ERRORS" "$LINENO" 5
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $RPM_PKG_ERRORS" >&5
|
|
|
e1d87d |
+$as_echo "$as_me: WARNING: $RPM_PKG_ERRORS" >&2;}
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
|
|
|
e1d87d |
|
|
|
e1d87d |
subdirs="$subdirs testsuite"
|
|
|
e1d87d |
Index: gdb-7.11.50.20160630/gdb/configure.ac
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.11.50.20160630.orig/gdb/configure.ac 2016-07-02 23:43:24.085214144 +0200
|
|
|
e1d87d |
+++ gdb-7.11.50.20160630/gdb/configure.ac 2016-07-03 14:37:12.582130819 +0200
|
|
|
e1d87d |
@@ -177,6 +177,199 @@
|
|
|
e1d87d |
[Directories safe to hold auto-loaded files.])
|
|
|
e1d87d |
AC_MSG_RESULT([$with_auto_load_safe_path])
|
|
|
e1d87d |
|
|
|
e1d87d |
+# Integration with rpm library to support missing debuginfo suggestions.
|
|
|
e1d87d |
+# --without-rpm: Disable any rpm support.
|
|
|
e1d87d |
+# --with-rpm=libname.so: Try to dynamically open `libname.so' during runtime.
|
|
|
e1d87d |
+# Even with runtime missing `libname.so' GDB will still other run correctly.
|
|
|
e1d87d |
+# Missing `libname.so' during ./configure will abort the configuration.
|
|
|
e1d87d |
+# --with-rpm=librpm.so: Like `--with-rpm=libname.so' but try to find specific
|
|
|
e1d87d |
+# minor version first such as `librpm-4.6.so' as minor version differences
|
|
|
e1d87d |
+# mean API+ABI incompatibility. If the specific match versioned library name
|
|
|
e1d87d |
+# could not be found still open dynamically at least `librpm.so'.
|
|
|
e1d87d |
+# --with-rpm: Like `--with-rpm=librpm.so' but if any of its detection fails try
|
|
|
e1d87d |
+# to find librpm for compilation-time linking by pkg-config. GDB binary will
|
|
|
e1d87d |
+# be probably linked with the version specific library (as `librpm-4.6.so').
|
|
|
e1d87d |
+# Failure to find librpm by pkg-config will abort the configuration.
|
|
|
e1d87d |
+# (default) --with-rpm=auto: Like `--with-rpm=librpm.so' but if even pkg-config
|
|
|
e1d87d |
+# cannot find librpm use to the rpmless compilation (like `--without-rpm').
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+AC_ARG_WITH([rpm],
|
|
|
e1d87d |
+ [AS_HELP_STRING([--with-rpm],
|
|
|
e1d87d |
+ [query rpm database for missing debuginfos (yes/no, def. auto=librpm.so)])], [], [with_rpm="auto"])
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+m4_pattern_allow([^AC_MSG_ERROR$])
|
|
|
e1d87d |
+m4_pattern_allow([^AC_MSG_WARN$])
|
|
|
e1d87d |
+if test "x$with_rpm" != "xno"; then
|
|
|
e1d87d |
+ if test "x$with_rpm" = "xyes"; then
|
|
|
e1d87d |
+ LIBRPM="librpm.so"
|
|
|
e1d87d |
+ RPM_REQUIRE=true
|
|
|
e1d87d |
+ DLOPEN_REQUIRE=false
|
|
|
e1d87d |
+ elif test "x$with_rpm" = "xauto"; then
|
|
|
e1d87d |
+ LIBRPM="librpm.so"
|
|
|
e1d87d |
+ RPM_REQUIRE=false
|
|
|
e1d87d |
+ DLOPEN_REQUIRE=false
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ LIBRPM="$with_rpm"
|
|
|
e1d87d |
+ RPM_REQUIRE=true
|
|
|
e1d87d |
+ DLOPEN_REQUIRE=true
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+ LIBRPM_STRING='"'"$LIBRPM"'"'
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ AC_MSG_CHECKING([specific librpm version])
|
|
|
e1d87d |
+ HAVE_DLOPEN_LIBRPM=false
|
|
|
e1d87d |
+ save_LIBS="$LIBS"
|
|
|
e1d87d |
+ LIBS="$LIBS -ldl"
|
|
|
e1d87d |
+ AC_RUN_IFELSE(AC_LANG_PROGRAM([[
|
|
|
e1d87d |
+#include <rpm/rpmlib.h>
|
|
|
e1d87d |
+#include <dlfcn.h>
|
|
|
e1d87d |
+#include <errno.h>
|
|
|
e1d87d |
+ ]], [[
|
|
|
e1d87d |
+ void *h;
|
|
|
e1d87d |
+ const char *const *rpmverp;
|
|
|
e1d87d |
+ FILE *f;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ f = fopen ("conftest.out", "w");
|
|
|
e1d87d |
+ if (!f)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ fprintf (stderr, "Cannot write \"%s\": %s\n", "conftest.out",
|
|
|
e1d87d |
+ strerror (errno));
|
|
|
e1d87d |
+ return 1;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ h = dlopen ($LIBRPM_STRING, RTLD_LAZY);
|
|
|
e1d87d |
+ if (!h)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ fprintf (stderr, "dlopen (\"%s\"): %s\n", $LIBRPM_STRING, dlerror ());
|
|
|
e1d87d |
+ return 1;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ rpmverp = dlsym (h, "RPMVERSION");
|
|
|
e1d87d |
+ if (!rpmverp)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ fprintf (stderr, "dlsym (\"RPMVERSION\"): %s\n", dlerror ());
|
|
|
e1d87d |
+ return 1;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ fprintf (stderr, "RPMVERSION is: \"");
|
|
|
e1d87d |
+ fprintf (stderr, "%s\"\n", *rpmverp);
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ /* Try to find the specific librpm version only for "librpm.so" as we do
|
|
|
e1d87d |
+ not know how to assemble the version string otherwise. */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if (strcmp ("librpm.so", $LIBRPM_STRING) != 0)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ fprintf (f, "%s\n", $LIBRPM_STRING);
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ char *h2_name;
|
|
|
e1d87d |
+ void *h2;
|
|
|
e1d87d |
+ int major, minor;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if (sscanf (*rpmverp, "%d.%d", &major, &minor) != 2)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ fprintf (stderr, "Unable to parse RPMVERSION.\n");
|
|
|
e1d87d |
+ fprintf (f, "%s\n", $LIBRPM_STRING);
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ /* Avoid the square brackets by malloc. */
|
|
|
e1d87d |
+ h2_name = malloc (64);
|
|
|
e1d87d |
+ sprintf (h2_name, "librpm-%d.%d.so", major, minor);
|
|
|
e1d87d |
+ h2 = dlopen (h2_name, RTLD_LAZY);
|
|
|
e1d87d |
+ if (!h2)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ fprintf (stderr, "dlopen (\"%s\"): %s\n", h2_name, dlerror ());
|
|
|
e1d87d |
+ fprintf (f, "%s\n", $LIBRPM_STRING);
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ if (h2 != h)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ fprintf (stderr, "dlopen of \"%s\" and \"%s\" are different.\n",
|
|
|
e1d87d |
+ $LIBRPM_STRING, h2_name);
|
|
|
e1d87d |
+ fprintf (f, "%s\n", $LIBRPM_STRING);
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ /* Found the valid .so name with a specific version. */
|
|
|
e1d87d |
+ fprintf (f, "%s\n", h2_name);
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ ]]), [
|
|
|
e1d87d |
+ DLOPEN_LIBRPM="`cat conftest.out`"
|
|
|
e1d87d |
+ if test "x$DLOPEN_LIBRPM" != "x"; then
|
|
|
e1d87d |
+ HAVE_DLOPEN_LIBRPM=true
|
|
|
e1d87d |
+ AC_MSG_RESULT($DLOPEN_LIBRPM)
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+ ])
|
|
|
e1d87d |
+ rm -f conftest.out
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ m4_define([CHECK_LIBRPM_COMPAT], [
|
|
|
e1d87d |
+ AC_MSG_CHECKING([rpm library API compatibility])
|
|
|
e1d87d |
+ # The compilation requires -Werror to verify anything.
|
|
|
e1d87d |
+ save_CFLAGS="$CFLAGS"
|
|
|
e1d87d |
+ CFLAGS="$CFLAGS -Werror"
|
|
|
e1d87d |
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[
|
|
|
e1d87d |
+/* Duplicate here the declarations to verify they match "elfread.c". */
|
|
|
e1d87d |
+#include <rpm/rpmlib.h>
|
|
|
e1d87d |
+#include <rpm/rpmts.h>
|
|
|
e1d87d |
+#include <rpm/rpmdb.h>
|
|
|
e1d87d |
+#include <rpm/header.h>
|
|
|
e1d87d |
+extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg);
|
|
|
e1d87d |
+extern int rpmReadConfigFiles(const char * file, const char * target);
|
|
|
e1d87d |
+extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi);
|
|
|
e1d87d |
+extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
|
|
|
e1d87d |
+extern rpmts rpmtsCreate(void);
|
|
|
e1d87d |
+extern rpmts rpmtsFree(rpmts ts);
|
|
|
e1d87d |
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
|
|
e1d87d |
+ const void * keyp, size_t keylen);
|
|
|
e1d87d |
+ ]]), [
|
|
|
e1d87d |
+ LIBRPM_COMPAT=true
|
|
|
e1d87d |
+ AC_MSG_RESULT(yes)
|
|
|
e1d87d |
+ ], [
|
|
|
e1d87d |
+ LIBRPM_COMPAT=false
|
|
|
e1d87d |
+ AC_MSG_RESULT(no)
|
|
|
e1d87d |
+ ])
|
|
|
e1d87d |
+ CFLAGS="$save_CFLAGS"
|
|
|
e1d87d |
+ ])
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if $HAVE_DLOPEN_LIBRPM; then
|
|
|
e1d87d |
+ CHECK_LIBRPM_COMPAT
|
|
|
e1d87d |
+ if ! $LIBRPM_COMPAT; then
|
|
|
e1d87d |
+ HAVE_DLOPEN_LIBRPM=false
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if $HAVE_DLOPEN_LIBRPM; then
|
|
|
e1d87d |
+ DLOPEN_LIBRPM_STRING='"'"$DLOPEN_LIBRPM"'"'
|
|
|
e1d87d |
+ AC_DEFINE_UNQUOTED(DLOPEN_LIBRPM, $DLOPEN_LIBRPM_STRING, [librpm version specific library name to dlopen.])
|
|
|
e1d87d |
+ AC_DEFINE(HAVE_LIBRPM, 1, [Define if librpm library is being used.])
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ AC_MSG_RESULT(no)
|
|
|
e1d87d |
+ LIBS="$save_LIBS"
|
|
|
e1d87d |
+ if $DLOPEN_REQUIRE; then
|
|
|
e1d87d |
+ AC_MSG_ERROR([Specific name $LIBRPM was requested but it could not be opened.])
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+ PKG_CHECK_MODULES(RPM, rpm, [HAVE_LIBRPM=true], [HAVE_LIBRPM=false])
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if $HAVE_LIBRPM; then
|
|
|
e1d87d |
+ CHECK_LIBRPM_COMPAT
|
|
|
e1d87d |
+ if ! $LIBRPM_COMPAT; then
|
|
|
e1d87d |
+ HAVE_LIBRPM=false
|
|
|
e1d87d |
+ RPM_PKG_ERRORS="Found $LIBRPM API is incompatibile with this GDB"
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if $HAVE_LIBRPM; then
|
|
|
e1d87d |
+ AC_DEFINE(HAVE_LIBRPM, 1, [Define if librpm library is being used.])
|
|
|
e1d87d |
+ CFLAGS="$CFLAGS $RPM_CFLAGS"
|
|
|
e1d87d |
+ LIBS="$LIBS $RPM_LIBS"
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ if $RPM_REQUIRE; then
|
|
|
e1d87d |
+ AC_MSG_ERROR($RPM_PKG_ERRORS)
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ AC_MSG_WARN($RPM_PKG_ERRORS)
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+ fi
|
|
|
e1d87d |
+fi
|
|
|
e1d87d |
+
|
|
|
e1d87d |
AC_CONFIG_SUBDIRS(testsuite)
|
|
|
e1d87d |
|
|
|
e1d87d |
# Check whether to support alternative target configurations
|
|
|
e1d87d |
Index: gdb-7.11.50.20160630/gdb/corelow.c
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.11.50.20160630.orig/gdb/corelow.c 2016-07-03 14:34:32.022753582 +0200
|
|
|
e1d87d |
+++ gdb-7.11.50.20160630/gdb/corelow.c 2016-07-03 14:37:12.582130819 +0200
|
|
|
e1d87d |
@@ -310,7 +310,7 @@
|
|
|
e1d87d |
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
|
|
e1d87d |
}
|
|
|
e1d87d |
else
|
|
|
e1d87d |
- debug_print_missing (_("the main executable file"), build_id_filename);
|
|
|
e1d87d |
+ debug_print_missing (BUILD_ID_MAIN_EXECUTABLE_FILENAME, build_id_filename);
|
|
|
e1d87d |
|
|
|
e1d87d |
do_cleanups (back_to);
|
|
|
e1d87d |
|
|
|
e1d87d |
Index: gdb-7.11.50.20160630/gdb/build-id.c
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.11.50.20160630.orig/gdb/build-id.c 2016-07-03 14:36:50.124938187 +0200
|
|
|
e1d87d |
+++ gdb-7.11.50.20160630/gdb/build-id.c 2016-07-03 14:42:25.171812134 +0200
|
|
|
e1d87d |
@@ -35,6 +35,7 @@
|
|
|
e1d87d |
#include "elf/common.h"
|
|
|
e1d87d |
#include "elf-bfd.h"
|
|
|
e1d87d |
#include <sys/stat.h>
|
|
|
e1d87d |
+#include "elf/external.h"
|
|
|
e1d87d |
|
|
|
e1d87d |
#define BUILD_ID_VERBOSE_NONE 0
|
|
|
e1d87d |
#define BUILD_ID_VERBOSE_FILENAMES 1
|
|
|
e1d87d |
@@ -665,8 +666,366 @@
|
|
|
e1d87d |
return result;
|
|
|
e1d87d |
}
|
|
|
e1d87d |
|
|
|
e1d87d |
+#ifdef HAVE_LIBRPM
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+#include <rpm/rpmlib.h>
|
|
|
e1d87d |
+#include <rpm/rpmts.h>
|
|
|
e1d87d |
+#include <rpm/rpmdb.h>
|
|
|
e1d87d |
+#include <rpm/header.h>
|
|
|
e1d87d |
+#ifdef DLOPEN_LIBRPM
|
|
|
e1d87d |
+#include <dlfcn.h>
|
|
|
e1d87d |
+#endif
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+/* This MISSING_RPM_HASH tracker is used to collect all the missing rpm files
|
|
|
e1d87d |
+ and avoid their duplicities during a single inferior run. */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+static struct htab *missing_rpm_hash;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+/* This MISSING_RPM_LIST tracker is used to collect and print as a single line
|
|
|
e1d87d |
+ all the rpms right before the nearest GDB prompt. It gets cleared after
|
|
|
e1d87d |
+ each such print (it is questionable if we should clear it after the print).
|
|
|
e1d87d |
+ */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+struct missing_rpm
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ struct missing_rpm *next;
|
|
|
e1d87d |
+ char rpm[1];
|
|
|
e1d87d |
+ };
|
|
|
e1d87d |
+static struct missing_rpm *missing_rpm_list;
|
|
|
e1d87d |
+static int missing_rpm_list_entries;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+/* Returns the count of newly added rpms. */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+static int
|
|
|
e1d87d |
+missing_rpm_enlist (const char *filename)
|
|
|
e1d87d |
+{
|
|
|
e1d87d |
+ static int rpm_init_done = 0;
|
|
|
e1d87d |
+ rpmts ts;
|
|
|
e1d87d |
+ rpmdbMatchIterator mi;
|
|
|
e1d87d |
+ int count = 0;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+#ifdef DLOPEN_LIBRPM
|
|
|
e1d87d |
+ /* Duplicate here the declarations to verify they match. The same sanity
|
|
|
e1d87d |
+ check is present also in `configure.ac'. */
|
|
|
e1d87d |
+ extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg);
|
|
|
e1d87d |
+ static char *(*headerFormat_p) (Header h, const char * fmt, errmsg_t *errmsg);
|
|
|
e1d87d |
+ extern int rpmReadConfigFiles(const char * file, const char * target);
|
|
|
e1d87d |
+ static int (*rpmReadConfigFiles_p) (const char * file, const char * target);
|
|
|
e1d87d |
+ extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi);
|
|
|
e1d87d |
+ static rpmdbMatchIterator (*rpmdbFreeIterator_p) (rpmdbMatchIterator mi);
|
|
|
e1d87d |
+ extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
|
|
|
e1d87d |
+ static Header (*rpmdbNextIterator_p) (rpmdbMatchIterator mi);
|
|
|
e1d87d |
+ extern rpmts rpmtsCreate(void);
|
|
|
e1d87d |
+ static rpmts (*rpmtsCreate_p) (void);
|
|
|
e1d87d |
+ extern rpmts rpmtsFree(rpmts ts);
|
|
|
e1d87d |
+ static rpmts (*rpmtsFree_p) (rpmts ts);
|
|
|
e1d87d |
+ extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
|
|
e1d87d |
+ const void * keyp, size_t keylen);
|
|
|
e1d87d |
+ static rpmdbMatchIterator (*rpmtsInitIterator_p) (const rpmts ts,
|
|
|
e1d87d |
+ rpmTag rpmtag,
|
|
|
e1d87d |
+ const void *keyp,
|
|
|
e1d87d |
+ size_t keylen);
|
|
|
e1d87d |
+#else /* !DLOPEN_LIBRPM */
|
|
|
e1d87d |
+# define headerFormat_p headerFormat
|
|
|
e1d87d |
+# define rpmReadConfigFiles_p rpmReadConfigFiles
|
|
|
e1d87d |
+# define rpmdbFreeIterator_p rpmdbFreeIterator
|
|
|
e1d87d |
+# define rpmdbNextIterator_p rpmdbNextIterator
|
|
|
e1d87d |
+# define rpmtsCreate_p rpmtsCreate
|
|
|
e1d87d |
+# define rpmtsFree_p rpmtsFree
|
|
|
e1d87d |
+# define rpmtsInitIterator_p rpmtsInitIterator
|
|
|
e1d87d |
+#endif /* !DLOPEN_LIBRPM */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ gdb_assert (filename != NULL);
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if (strcmp (filename, BUILD_ID_MAIN_EXECUTABLE_FILENAME) == 0)
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if (is_target_filename (filename))
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if (filename[0] != '/')
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ warning (_("Ignoring non-absolute filename: <%s>"), filename);
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if (!rpm_init_done)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ static int init_tried;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ /* Already failed the initialization before? */
|
|
|
e1d87d |
+ if (init_tried)
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ init_tried = 1;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+#ifdef DLOPEN_LIBRPM
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ void *h;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ h = dlopen (DLOPEN_LIBRPM, RTLD_LAZY);
|
|
|
e1d87d |
+ if (!h)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ warning (_("Unable to open \"%s\" (%s), "
|
|
|
e1d87d |
+ "missing debuginfos notifications will not be displayed"),
|
|
|
e1d87d |
+ DLOPEN_LIBRPM, dlerror ());
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if (!((headerFormat_p = (char *(*) (Header h, const char * fmt, errmsg_t *errmsg)) dlsym (h, "headerFormat"))
|
|
|
e1d87d |
+ && (rpmReadConfigFiles_p = (int (*) (const char * file, const char * target)) dlsym (h, "rpmReadConfigFiles"))
|
|
|
e1d87d |
+ && (rpmdbFreeIterator_p = (rpmdbMatchIterator (*) (rpmdbMatchIterator mi)) dlsym (h, "rpmdbFreeIterator"))
|
|
|
e1d87d |
+ && (rpmdbNextIterator_p = (Header (*) (rpmdbMatchIterator mi)) dlsym (h, "rpmdbNextIterator"))
|
|
|
e1d87d |
+ && (rpmtsCreate_p = (rpmts (*) (void)) dlsym (h, "rpmtsCreate"))
|
|
|
e1d87d |
+ && (rpmtsFree_p = (rpmts (*) (rpmts ts)) dlsym (h, "rpmtsFree"))
|
|
|
e1d87d |
+ && (rpmtsInitIterator_p = (rpmdbMatchIterator (*) (const rpmts ts, rpmTag rpmtag, const void *keyp, size_t keylen)) dlsym (h, "rpmtsInitIterator"))))
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ warning (_("Opened library \"%s\" is incompatible (%s), "
|
|
|
e1d87d |
+ "missing debuginfos notifications will not be displayed"),
|
|
|
e1d87d |
+ DLOPEN_LIBRPM, dlerror ());
|
|
|
e1d87d |
+ if (dlclose (h))
|
|
|
e1d87d |
+ warning (_("Error closing library \"%s\": %s\n"), DLOPEN_LIBRPM,
|
|
|
e1d87d |
+ dlerror ());
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+#endif /* DLOPEN_LIBRPM */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if (rpmReadConfigFiles_p (NULL, NULL) != 0)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ warning (_("Error reading the rpm configuration files"));
|
|
|
e1d87d |
+ return 0;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ rpm_init_done = 1;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ ts = rpmtsCreate_p ();
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
|
|
|
e1d87d |
+ if (mi != NULL)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ for (;;)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ Header h;
|
|
|
e1d87d |
+ char *debuginfo, **slot, *s, *s2;
|
|
|
e1d87d |
+ errmsg_t err;
|
|
|
e1d87d |
+ size_t srcrpmlen = sizeof (".src.rpm") - 1;
|
|
|
e1d87d |
+ size_t debuginfolen = sizeof ("-debuginfo") - 1;
|
|
|
e1d87d |
+ rpmdbMatchIterator mi_debuginfo;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ h = rpmdbNextIterator_p (mi);
|
|
|
e1d87d |
+ if (h == NULL)
|
|
|
e1d87d |
+ break;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ /* Verify the debuginfo file is not already installed. */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ debuginfo = headerFormat_p (h, "%{sourcerpm}-debuginfo.%{arch}",
|
|
|
e1d87d |
+ &err;;
|
|
|
e1d87d |
+ if (!debuginfo)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ warning (_("Error querying the rpm file `%s': %s"), filename,
|
|
|
e1d87d |
+ err);
|
|
|
e1d87d |
+ continue;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ /* s = `.src.rpm-debuginfo.%{arch}' */
|
|
|
e1d87d |
+ s = strrchr (debuginfo, '-') - srcrpmlen;
|
|
|
e1d87d |
+ s2 = NULL;
|
|
|
e1d87d |
+ if (s > debuginfo && memcmp (s, ".src.rpm", srcrpmlen) == 0)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ /* s2 = `-%{release}.src.rpm-debuginfo.%{arch}' */
|
|
|
e1d87d |
+ s2 = (char *) memrchr (debuginfo, '-', s - debuginfo);
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ if (s2)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */
|
|
|
e1d87d |
+ s2 = (char *) memrchr (debuginfo, '-', s2 - debuginfo);
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ if (!s2)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ warning (_("Error querying the rpm file `%s': %s"), filename,
|
|
|
e1d87d |
+ debuginfo);
|
|
|
e1d87d |
+ xfree (debuginfo);
|
|
|
e1d87d |
+ continue;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ /* s = `.src.rpm-debuginfo.%{arch}' */
|
|
|
e1d87d |
+ /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */
|
|
|
e1d87d |
+ memmove (s2 + debuginfolen, s2, s - s2);
|
|
|
e1d87d |
+ memcpy (s2, "-debuginfo", debuginfolen);
|
|
|
e1d87d |
+ /* s = `XXXX.%{arch}' */
|
|
|
e1d87d |
+ /* strlen ("XXXX") == srcrpmlen + debuginfolen */
|
|
|
e1d87d |
+ /* s2 = `-debuginfo-%{version}-%{release}XX.%{arch}' */
|
|
|
e1d87d |
+ /* strlen ("XX") == srcrpmlen */
|
|
|
e1d87d |
+ memmove (s + debuginfolen, s + srcrpmlen + debuginfolen,
|
|
|
e1d87d |
+ strlen (s + srcrpmlen + debuginfolen) + 1);
|
|
|
e1d87d |
+ /* s = `-debuginfo-%{version}-%{release}.%{arch}' */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ /* RPMDBI_PACKAGES requires keylen == sizeof (int). */
|
|
|
e1d87d |
+ /* RPMDBI_LABEL is an interface for NVR-based dbiFindByLabel(). */
|
|
|
e1d87d |
+ mi_debuginfo = rpmtsInitIterator_p (ts, (rpmTag) RPMDBI_LABEL, debuginfo, 0);
|
|
|
e1d87d |
+ xfree (debuginfo);
|
|
|
e1d87d |
+ if (mi_debuginfo)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ rpmdbFreeIterator_p (mi_debuginfo);
|
|
|
e1d87d |
+ count = 0;
|
|
|
e1d87d |
+ break;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ /* The allocated memory gets utilized below for MISSING_RPM_HASH. */
|
|
|
e1d87d |
+ debuginfo = headerFormat_p (h,
|
|
|
e1d87d |
+ "%{name}-%{version}-%{release}.%{arch}",
|
|
|
e1d87d |
+ &err;;
|
|
|
e1d87d |
+ if (!debuginfo)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ warning (_("Error querying the rpm file `%s': %s"), filename,
|
|
|
e1d87d |
+ err);
|
|
|
e1d87d |
+ continue;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ /* Base package name for `debuginfo-install'. We do not use the
|
|
|
e1d87d |
+ `yum' command directly as the line
|
|
|
e1d87d |
+ yum --enablerepo='*debug*' install NAME-debuginfo.ARCH
|
|
|
e1d87d |
+ would be more complicated than just:
|
|
|
e1d87d |
+ debuginfo-install NAME-VERSION-RELEASE.ARCH
|
|
|
e1d87d |
+ Do not supply the rpm base name (derived from .src.rpm name) as
|
|
|
e1d87d |
+ debuginfo-install is unable to install the debuginfo package if
|
|
|
e1d87d |
+ the base name PKG binary rpm is not installed while for example
|
|
|
e1d87d |
+ PKG-libs would be installed (RH Bug 467901).
|
|
|
e1d87d |
+ FUTURE: After multiple debuginfo versions simultaneously installed
|
|
|
e1d87d |
+ get supported the support for the VERSION-RELEASE tags handling
|
|
|
e1d87d |
+ may need an update. */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if (missing_rpm_hash == NULL)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ /* DEL_F is passed NULL as MISSING_RPM_LIST's HTAB_DELETE
|
|
|
e1d87d |
+ should not deallocate the entries. */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ missing_rpm_hash = htab_create_alloc (64, htab_hash_string,
|
|
|
e1d87d |
+ (int (*) (const void *, const void *)) streq,
|
|
|
e1d87d |
+ NULL, xcalloc, xfree);
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ slot = (char **) htab_find_slot (missing_rpm_hash, debuginfo, INSERT);
|
|
|
e1d87d |
+ /* XCALLOC never returns NULL. */
|
|
|
e1d87d |
+ gdb_assert (slot != NULL);
|
|
|
e1d87d |
+ if (*slot == NULL)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ struct missing_rpm *missing_rpm;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ *slot = debuginfo;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ missing_rpm = (struct missing_rpm *) xmalloc (sizeof (*missing_rpm) + strlen (debuginfo));
|
|
|
e1d87d |
+ strcpy (missing_rpm->rpm, debuginfo);
|
|
|
e1d87d |
+ missing_rpm->next = missing_rpm_list;
|
|
|
e1d87d |
+ missing_rpm_list = missing_rpm;
|
|
|
e1d87d |
+ missing_rpm_list_entries++;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ xfree (debuginfo);
|
|
|
e1d87d |
+ count++;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ rpmdbFreeIterator_p (mi);
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ rpmtsFree_p (ts);
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ return count;
|
|
|
e1d87d |
+}
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+static int
|
|
|
e1d87d |
+missing_rpm_list_compar (const char *const *ap, const char *const *bp)
|
|
|
e1d87d |
+{
|
|
|
e1d87d |
+ return strcoll (*ap, *bp);
|
|
|
e1d87d |
+}
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+/* It returns a NULL-terminated array of strings needing to be FREEd. It may
|
|
|
e1d87d |
+ also return only NULL. */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+static void
|
|
|
e1d87d |
+missing_rpm_list_print (void)
|
|
|
e1d87d |
+{
|
|
|
e1d87d |
+ char **array, **array_iter;
|
|
|
e1d87d |
+ struct missing_rpm *list_iter;
|
|
|
e1d87d |
+ struct cleanup *cleanups;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ if (missing_rpm_list_entries == 0)
|
|
|
e1d87d |
+ return;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ array = (char **) xmalloc (sizeof (*array) * missing_rpm_list_entries);
|
|
|
e1d87d |
+ cleanups = make_cleanup (xfree, array);
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ array_iter = array;
|
|
|
e1d87d |
+ for (list_iter = missing_rpm_list; list_iter != NULL;
|
|
|
e1d87d |
+ list_iter = list_iter->next)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ *array_iter++ = list_iter->rpm;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ gdb_assert (array_iter == array + missing_rpm_list_entries);
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ qsort (array, missing_rpm_list_entries, sizeof (*array),
|
|
|
e1d87d |
+ (int (*) (const void *, const void *)) missing_rpm_list_compar);
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ printf_unfiltered (_("Missing separate debuginfos, use: %s"),
|
|
|
e1d87d |
+#ifdef DNF_DEBUGINFO_INSTALL
|
|
|
e1d87d |
+ "dnf "
|
|
|
e1d87d |
+#endif
|
|
|
e1d87d |
+ "debuginfo-install");
|
|
|
e1d87d |
+ for (array_iter = array; array_iter < array + missing_rpm_list_entries;
|
|
|
e1d87d |
+ array_iter++)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ putchar_unfiltered (' ');
|
|
|
e1d87d |
+ puts_unfiltered (*array_iter);
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ putchar_unfiltered ('\n');
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ while (missing_rpm_list != NULL)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ list_iter = missing_rpm_list;
|
|
|
e1d87d |
+ missing_rpm_list = list_iter->next;
|
|
|
e1d87d |
+ xfree (list_iter);
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ missing_rpm_list_entries = 0;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ do_cleanups (cleanups);
|
|
|
e1d87d |
+}
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+static void
|
|
|
e1d87d |
+missing_rpm_change (void)
|
|
|
e1d87d |
+{
|
|
|
e1d87d |
+ debug_flush_missing ();
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ gdb_assert (missing_rpm_list == NULL);
|
|
|
e1d87d |
+ if (missing_rpm_hash != NULL)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ htab_delete (missing_rpm_hash);
|
|
|
e1d87d |
+ missing_rpm_hash = NULL;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+}
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+enum missing_exec
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ /* Init state. EXEC_BFD also still could be NULL. */
|
|
|
e1d87d |
+ MISSING_EXEC_NOT_TRIED,
|
|
|
e1d87d |
+ /* We saw a non-NULL EXEC_BFD but RPM has no info about it. */
|
|
|
e1d87d |
+ MISSING_EXEC_NOT_FOUND,
|
|
|
e1d87d |
+ /* We found EXEC_BFD by RPM and we either have its symbols (either embedded
|
|
|
e1d87d |
+ or separate) or the main executable's RPM is now contained in
|
|
|
e1d87d |
+ MISSING_RPM_HASH. */
|
|
|
e1d87d |
+ MISSING_EXEC_ENLISTED
|
|
|
e1d87d |
+ };
|
|
|
e1d87d |
+static enum missing_exec missing_exec = MISSING_EXEC_NOT_TRIED;
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+#endif /* HAVE_LIBRPM */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+void
|
|
|
e1d87d |
+debug_flush_missing (void)
|
|
|
e1d87d |
+{
|
|
|
e1d87d |
+#ifdef HAVE_LIBRPM
|
|
|
e1d87d |
+ missing_rpm_list_print ();
|
|
|
e1d87d |
+#endif
|
|
|
e1d87d |
+}
|
|
|
e1d87d |
+
|
|
|
e1d87d |
/* This MISSING_FILEPAIR_HASH tracker is used only for the duplicite messages
|
|
|
e1d87d |
- Try to install the hash file ...
|
|
|
e1d87d |
+ yum --enablerepo='*debug*' install ...
|
|
|
e1d87d |
avoidance. */
|
|
|
e1d87d |
|
|
|
e1d87d |
struct missing_filepair
|
|
|
e1d87d |
@@ -720,11 +1079,17 @@
|
|
|
e1d87d |
/* All their memory came just from missing_filepair_OBSTACK. */
|
|
|
e1d87d |
missing_filepair_hash = NULL;
|
|
|
e1d87d |
}
|
|
|
e1d87d |
+#ifdef HAVE_LIBRPM
|
|
|
e1d87d |
+ missing_exec = MISSING_EXEC_NOT_TRIED;
|
|
|
e1d87d |
+#endif
|
|
|
e1d87d |
}
|
|
|
e1d87d |
|
|
|
e1d87d |
static void
|
|
|
e1d87d |
debug_print_executable_changed (void)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
+#ifdef HAVE_LIBRPM
|
|
|
e1d87d |
+ missing_rpm_change ();
|
|
|
e1d87d |
+#endif
|
|
|
e1d87d |
missing_filepair_change ();
|
|
|
e1d87d |
}
|
|
|
e1d87d |
|
|
|
e1d87d |
@@ -791,14 +1156,39 @@
|
|
|
e1d87d |
|
|
|
e1d87d |
*slot = missing_filepair;
|
|
|
e1d87d |
|
|
|
e1d87d |
- /* We do not collect and flush these messages as each such message
|
|
|
e1d87d |
- already requires its own separate lines. */
|
|
|
e1d87d |
+#ifdef HAVE_LIBRPM
|
|
|
e1d87d |
+ if (missing_exec == MISSING_EXEC_NOT_TRIED)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ char *execfilename;
|
|
|
e1d87d |
|
|
|
e1d87d |
- fprintf_unfiltered (gdb_stdlog,
|
|
|
e1d87d |
- _("Missing separate debuginfo for %s\n"), binary);
|
|
|
e1d87d |
- if (debug != NULL)
|
|
|
e1d87d |
- fprintf_unfiltered (gdb_stdlog, _("Try to install the hash file %s\n"),
|
|
|
e1d87d |
- debug);
|
|
|
e1d87d |
+ execfilename = get_exec_file (0);
|
|
|
e1d87d |
+ if (execfilename != NULL)
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ if (missing_rpm_enlist (execfilename) == 0)
|
|
|
e1d87d |
+ missing_exec = MISSING_EXEC_NOT_FOUND;
|
|
|
e1d87d |
+ else
|
|
|
e1d87d |
+ missing_exec = MISSING_EXEC_ENLISTED;
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
+ if (missing_exec != MISSING_EXEC_ENLISTED)
|
|
|
e1d87d |
+ if ((binary[0] == 0 || missing_rpm_enlist (binary) == 0)
|
|
|
e1d87d |
+ && (debug == NULL || missing_rpm_enlist (debug) == 0))
|
|
|
e1d87d |
+#endif /* HAVE_LIBRPM */
|
|
|
e1d87d |
+ {
|
|
|
e1d87d |
+ /* We do not collect and flush these messages as each such message
|
|
|
e1d87d |
+ already requires its own separate lines. */
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+ fprintf_unfiltered (gdb_stdlog,
|
|
|
e1d87d |
+ _("Missing separate debuginfo for %s\n"), binary);
|
|
|
e1d87d |
+ if (debug != NULL)
|
|
|
e1d87d |
+ fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"),
|
|
|
e1d87d |
+#ifdef DNF_DEBUGINFO_INSTALL
|
|
|
e1d87d |
+ "dnf"
|
|
|
e1d87d |
+#else
|
|
|
e1d87d |
+ "yum"
|
|
|
e1d87d |
+#endif
|
|
|
e1d87d |
+ " --enablerepo='*debug*' install", debug);
|
|
|
e1d87d |
+ }
|
|
|
e1d87d |
}
|
|
|
e1d87d |
|
|
|
e1d87d |
/* See build-id.h. */
|