# your system doesn't have fcntl.h in /usr/include (which is where it
# should be according to Posix).
DEFS = @DEFS@
-GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config \
+GDB_CFLAGS = -I$(srcdir)/config.h -I. -I$(srcdir) -I$(srcdir)/config \
-DLOCALEDIR="\"$(localedir)\"" $(DEFS)
# MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.
# All generated files which can be included by another file.
generated_files = \
ada-lex.c \
- config.h \
+ gdb-config.h \
jit-reader.h \
$(NAT_GENERATED_FILES) \
$(NM_H)
gdb-gdb.gdb: $(srcdir)/gdb-gdb.gdb.in
$(SHELL) config.status $@
-config.h: stamp-h ; @true
-stamp-h: $(srcdir)/config.in config.status
- $(SHELL) config.status config.h
+gdb-config.h: stamp-h ; @true
+stamp-h: $(srcdir)/gdb-config.in config.status
+ $(SHELL) config.status gdb-config.h
nm.h: stamp-nmh ; @true
stamp-nmh: config.status
--- /dev/null
+/* config.h for GDB, the GNU debugger.
+ Copyright (C) 2020 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This file exists so that "#include <config.h>" in header files
+ (e.g. gnulib headers), includes this file, which then includes
+ gnulib's config.h, along with our real config.h (which is called
+ PROJECT-config.h) and other similar config.h files we may depend
+ on. */
+
+#include "gnulib/config.h"
+
+#undef PACKAGE_NAME
+#undef PACKAGE
+#undef PACKAGE_VERSION
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+
+#include <gdbsupport/support-config.h>
+
+#undef PACKAGE_NAME
+#undef PACKAGE
+#undef PACKAGE_VERSION
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+
+#include "gdb-config.h"
-ac_config_headers="$ac_config_headers config.h:config.in"
+ac_config_headers="$ac_config_headers gdb-config.h:gdb-config.in"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
- "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
+ "gdb-config.h") CONFIG_HEADERS="$CONFIG_HEADERS gdb-config.h:gdb-config.in" ;;
"depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
"jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
"nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
case $ac_file$ac_mode in
- "config.h":H) echo > stamp-h ;;
+ "gdb-config.h":H) echo > stamp-h ;;
"depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
"nm.h":L) echo > stamp-nmh ;;
"gcore":F) chmod +x gcore ;;
dnl Process this file with autoconf to produce a configure script.
AC_INIT(main.c)
-AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h])
+AC_CONFIG_HEADERS(gdb-config.h:gdb-config.in, [echo > stamp-h])
AM_MAINTAINER_MODE
# Set the 'development' global.
# in those directories should be included with the subdirectory.
# e.g.: "target/wait.h".
#
-INCLUDE_CFLAGS = -I. -I${srcdir} \
+INCLUDE_CFLAGS = -I$(srcdir)/config.h -I. -I${srcdir} \
-I$(srcdir)/../regformats -I$(srcdir)/.. -I$(INCLUDE_DIR) \
$(INCGNU) $(INCSUPPORT)
--- /dev/null
+/* config.h for the remote server for GDB.
+ Copyright (C) 2020 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This file exists so that "#include <config.h>" in header files
+ (e.g. gnulib headers), includes this file, which then includes
+ gnulib's config.h, along with our real config.h (which is called
+ PROJECT-config.h) and other similar config.h files we may depend
+ on. */
+
+#include <build-gnulib-gdbserver/config.h>
+
+#undef PACKAGE_NAME
+#undef PACKAGE
+#undef PACKAGE_VERSION
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+
+#include "gdbserver-config.h"
-ac_config_headers="$ac_config_headers config.h:config.in"
+ac_config_headers="$ac_config_headers gdbserver-config.h:gdbserver-config.in"
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
- "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
+ "gdbserver-config.h") CONFIG_HEADERS="$CONFIG_HEADERS gdbserver-config.h:gdbserver-config.in" ;;
"depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
"gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
case $ac_file$ac_mode in
- "config.h":H) echo > stamp-h ;;
+ "gdbserver-config.h":H) echo > stamp-h ;;
"depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
"gdbdepdir":C)
for subdir in ${CONFIG_SRC_SUBDIR}
dnl Process this file with autoconf to produce a configure script.
AC_INIT(server.c)
-AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h])
+AC_CONFIG_HEADERS(gdbserver-config.h:gdbserver-config.in, [echo > stamp-h])
AM_MAINTAINER_MODE
#include "gdbsupport/filestuff.h"
#include "gdbsupport/scoped_fd.h"
-#include "config.h"
#include "gdbsupport/selftest.h"
namespace selftests {
#include "gdbsupport/filestuff.h"
#include "gdbsupport/scoped_mmap.h"
-#include "config.h"
#if defined(HAVE_SYS_MMAN_H)
AUTOMAKE_OPTIONS = no-dist foreign
ACLOCAL_AMFLAGS = -I . -I ../config
-AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../gdb \
+AM_CPPFLAGS = -I$(srcdir)/config.h -I$(srcdir)/../include -I$(srcdir)/../gdb \
-I../gnulib/import -I$(srcdir)/../gnulib/import \
-I.. -I$(srcdir)/.. $(INCINTL) -I../bfd -I$(srcdir)/../bfd
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
- $(LISP)config.in
+ $(LISP)support-config.in
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = no-dist foreign
ACLOCAL_AMFLAGS = -I . -I ../config
-AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../gdb \
+AM_CPPFLAGS = -I$(srcdir)/config.h -I$(srcdir)/../include -I$(srcdir)/../gdb \
-I../gnulib/import -I$(srcdir)/../gnulib/import \
-I.. -I$(srcdir)/.. $(INCINTL) -I../bfd -I$(srcdir)/../bfd
@test -f $@ || rm -f stamp-h1
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
-stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
+stamp-h1: $(srcdir)/support-config.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status support-config.h
-$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+$(srcdir)/support-config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
#ifndef COMMON_COMMON_DEFS_H
#define COMMON_COMMON_DEFS_H
-#ifdef GDBSERVER
-
-#include <build-gnulib-gdbserver/config.h>
-
-#undef PACKAGE_NAME
-#undef PACKAGE
-#undef PACKAGE_VERSION
-#undef PACKAGE_STRING
-#undef PACKAGE_TARNAME
-
#include <config.h>
-#else /* GDBSERVER */
-
-#include <gdbsupport/support-config.h>
-
-#undef PACKAGE_NAME
-#undef PACKAGE
-#undef PACKAGE_VERSION
-#undef PACKAGE_STRING
-#undef PACKAGE_TARNAME
-
-#include "gnulib/config.h"
-
-#endif /* GDBSERVER */
-
/* From:
https://www.gnu.org/software/gnulib/manual/html_node/stdint_002eh.html
--- /dev/null
+/* config.h for gdbsupport.
+ Copyright (C) 2020 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This file exists so that "#include <config.h>" in header files
+ (e.g. gnulib headers), includes this file, which then includes
+ gnulib's config.h, along with our real config.h (which is called
+ PROJECT-config.h) and other similar config.h files we may depend
+ on. */
+
+#include "gnulib/config.h"
+
+#undef PACKAGE_NAME
+#undef PACKAGE
+#undef PACKAGE_VERSION
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+
+#include <gdbsupport/support-config.h>
-ac_config_headers="$ac_config_headers support-config.h:config.in"
+ac_config_headers="$ac_config_headers support-config.h:support-config.in"
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
ac_compiler_gnu=$ac_cv_c_compiler_gnu
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
$as_echo_n "checking for sigsetjmp... " >&6; }
if ${gdb_cv_func_sigsetjmp+:} false; then :
$as_echo_n "(cached) " >&6
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <setjmp.h>
+ #include <setjmp.h>
int
main ()
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
-if test "$gdb_cv_func_sigsetjmp" = "yes"; then
+ if test "$gdb_cv_func_sigsetjmp" = "yes"; then
$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
-fi
+ fi
# Check whether --with-intel_pt was given.
with_intel_pt=auto
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
$as_echo_n "checking whether to use intel pt... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
$as_echo "$with_intel_pt" >&6; }
-if test "${with_intel_pt}" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
+ if test "${with_intel_pt}" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
- HAVE_LIBIPT=no
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ HAVE_LIBIPT=no
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <linux/perf_event.h>
-#ifndef PERF_ATTR_SIZE_VER5
-# error
-#endif
+ #include <linux/perf_event.h>
+ #ifndef PERF_ATTR_SIZE_VER5
+ # error
+ #endif
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
perf_event=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
- if test "$perf_event" != yes; then
- if test "$with_intel_pt" = yes; then
- as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
+ if test "$perf_event" != yes; then
+ if test "$with_intel_pt" = yes; then
+ as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
+ fi
fi
- fi
- if test "$HAVE_LIBIPT" != yes; then
- if test "$with_intel_pt" = yes; then
- as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
+ if test "$HAVE_LIBIPT" != yes; then
+ if test "$with_intel_pt" = yes; then
+ as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
- fi
- else
- save_LIBS=$LIBS
- LIBS="$LIBS $LIBIPT"
- for ac_func in pt_insn_event
+ fi
+ else
+ save_LIBS=$LIBS
+ LIBS="$LIBS $LIBIPT"
+ for ac_func in pt_insn_event
do :
ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
if test "x$ac_cv_func_pt_insn_event" = xyes; then :
fi
done
- ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
+ ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
"
if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
fi
- LIBS=$save_LIBS
+ LIBS=$save_LIBS
+ fi
fi
-fi
-if test "$ac_cv_header_sys_procfs_h" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
+ if test "$ac_cv_header_sys_procfs_h" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
$as_echo_n "(cached) " >&6
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
$as_echo_n "(cached) " >&6
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
$as_echo_n "(cached) " >&6
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
$as_echo_n "(cached) " >&6
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
$as_echo_n "(cached) " >&6
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
$as_echo_n "(cached) " >&6
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
$as_echo_n "(cached) " >&6
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
$as_echo_n "(cached) " >&6
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
-fi
+ fi
# Check whether we will enable the inclusion of unit tests when
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
- "support-config.h") CONFIG_HEADERS="$CONFIG_HEADERS support-config.h:config.in" ;;
+ "support-config.h") CONFIG_HEADERS="$CONFIG_HEADERS support-config.h:support-config.in" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
AC_INIT([gdbsupport], 1.0)
AC_CONFIG_SRCDIR(common-defs.h)
-AC_CONFIG_HEADER(support-config.h:config.in)
+AC_CONFIG_HEADER(support-config.h:support-config.in)
AC_CANONICAL_SYSTEM
AM_MAINTAINER_MODE
AC_CONFIG_AUX_DIR(..)