Age | Commit message (Collapse) | Author | Files | Lines |
|
Building with mingw currently fails:
CXX unittests/mkdir-recursive-selftests.o
/home/emaisin/src/binutils-gdb/gdb/unittests/mkdir-recursive-selftests.c: In function ‘void selftests::mkdir_recursive::test()’:
/home/emaisin/src/binutils-gdb/gdb/unittests/mkdir-recursive-selftests.c:49:20: error: ‘mkdtemp’ was not declared in this scope
if (mkdtemp (base) == NULL)
^
Commit
e418a61a67a ("Move mkdir_recursive to common/filestuff.c")
moved this code, but also removed the HAVE_MKDTEMP guard which prevented
the mkdtemp call to be compiled on mingw.
We can either put back the HAVE_MKDTEMP ifdef, or import the gnulib
mkdtemp module, which provides the function for mingw. Since the
mkdir_recursive is susceptible to be used on mingw at some point, I
think it would be nice to have it tested on mingw, so I did the latter.
Once built, I tested it on Windows (copied the resulting gdb.exe on a
Windows machine, ran it, and ran "maint selftest mkdir_recursive"). It
failed, because the temporary directory is hardcoded to "/tmp/...". I
therefore added and used a new get_standard_temp_dir function, which
returns an appropriate temporary directory for the host platform.
gdb/ChangeLog:
* common/pathstuff.c (get_standard_temp_dir): New.
* common/pathstuff.h (get_standard_temp_dir): New.
* config.in: Re-generate.
* configure: Re-generate.
* configure.ac: Don't check for mkdtemp.
* gnulib/aclocal-m4-deps.mk: Re-generate.
* gnulib/aclocal.m4: Re-generate.
* gnulib/config.in: Re-generate.
* gnulib/configure: Re-generate.
* gnulib/import/Makefile.am: Re-generate.
* gnulib/import/Makefile.in: Re-generate.
* gnulib/import/m4/gnulib-cache.m4: Re-generate.
* gnulib/import/m4/gnulib-comp.m4: Re-generate.
* gnulib/import/m4/mkdtemp.m4: New file.
* gnulib/import/mkdtemp.c: New file.
* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
Add mkdtemp module.
* unittests/mkdir-recursive-selftests.c (test): Use
get_standard_temp_dir.
(_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
ifdef.
* compile/compile.c (get_compile_file_tempdir): Likewise.
|
|
This reverts commit 98a17ece013cb94cd602496b9efb92b8816b3953.
|
|
Commit f19c7ff839d7a32ebb48482ae7d318fb46ca823d added a new member to the
prefixes array which included a use of the symbol AF_LOCAL. Unfortunately,
not all systems declare this symbol. This change only compiles the "unix:"
member if the system knows about AF_LOCAL.
gdb/ChangeLog:
* configure.ac: New test HAVE_AF_LOCAL
* common/netstuff.c (parse_connection_spec) [prefixes]: Only compile "unix:"
if HAVE_AF_LOCAL is true.
* configure: regenerate.
* config.in: regenerate.
|
|
This is a follow-up of:
https://sourceware.org/ml/gdb-patches/2018-08/msg00347.html
Instead of going throttle and always enabling our selftests (even in
non-development builds), this patch is a bit more conservative and
introduces a configure option ("--enable-unit-tests") that allows the
user to choose whether she wants unit tests in the build or not. Note
that the current behaviour is retained: if no option is provided, GDB
will have selftests included in a development build, and will *not*
have selftests included in a non-development build.
The rationale for having this option is still the same: due to the
many racy testcases and random failures we see when running the GDB
testsuite, it is unfortunately not possible to perform a full test
when one is building a downstream package. As the Fedora GDB
maintainer and one of the Debian GDB uploaders, I feel like this
situation could be improved by, at least, executing our selftests
after the package has been built.
This patch introduces no regressions to our build.
OK?
gdb/ChangeLog:
2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
Simon Marchi <simark@simark.ca>
* README (`configure' options): Add documentation for new
"--enable-unit-tests" option.
* acinclude.m4: Include "selftest.m4".
* configure: Regenerate.
* configure.ac: Use "GDB_AC_SELFTEST".
* maint.c (maintenance_selftest): Update message informing
that selftests have been disabled.
(maintenance_info_selftests): Likewise.
* selftest.m4: New file.
gdb/gdbserver/ChangeLog:
2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
Simon Marchi <simark@simark.ca>
* acinclude.m4: Include "../selftest.m4".
* configure: Regenerate.
* configure.ac: Use "GDB_AC_SELFTEST".
* configure.srv: Use "$enable_unittests" instead of
"$development" when checking whether unit tests have been
enabled.
* server.c (captured_main): Update message informing that
selftests have been disabled.
gdb/testsuite/ChangeLog:
2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
* gdb.gdb/unittest.exp: Update expected message informing that
selftests have been disabled.
* gdb.server/unittest.exp: Likewise.
squash! Add parameter to allow enabling/disabling selftests via configure
|
|
This adds --enable-ubsan to gdb's configure. By default it is enabled
in development mode, and disabled otherwise. This passes both
-fsanitize=undefined and -fno-sanitize-recover=undefined to
compilations, so that undefined behavior violations will be sure to
cause test failures.
gdb/ChangeLog
2018-10-03 Tom Tromey <tom@tromey.com>
* README: Mention --enable-ubsan.
* NEWS: Mention --enable-ubsan.
* acinclude.m4: Include sanitize.m4.
* configure: Rebuild.
* configure.ac: Call AM_GDB_UBSAN.
* sanitize.m4: New file.
gdb/doc/ChangeLog
2018-10-03 Tom Tromey <tom@tromey.com>
* gdb.texinfo (Configure Options): Document --enable-ubsan.
|
|
Extend the "target remote" and "target extended-remote" commands
such that if the filename provided is a Unix local domain (AF_UNIX)
socket, then it'll be treated as such, instead of trying to open
it as if it were a character device.
gdb/ChangeLog:
* NEWS: Mention changed commands.
* ser-uds.c: New file.
* configure.ac (SER_HARDWIRE): Add ser-uds.o.
* configure: Regenerate.
* Makefile.in: Add new file.
* serial.c (serial_open): Check if filename is a socket
and lookup the appropriate interface accordingly.
gdb/doc/ChangeLog:
* gdb.texinfo (Remote Connection Commands): Describe
the changes to target remote and target extended-remote
relating to Unix domain sockets.
|
|
This commit removes a workaround for a bug in glibc 2.1.3, which
was released 2000-02-24 and superseded 2000-11-09.
gdb/ChangeLog:
* gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
* proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
prfpregset_t instead of gdb_prfpregset_t.
* configure.ac (PRFPREGSET_T_BROKEN): Remove check.
* configure, config.in: Rebuild.
|
|
This commit adds a workaround from gdbserver's gdb_proc_service.h
to GDB's. It doesn't seem to have been needed on any glibc as far
back as 2001, but it's possibly required for other C libraries so
I've retained it.
gdb/ChangeLog:
* configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
(AC_CHECK_HEADERS): Check for linux/elf.h.
* configure, config.in: Rebuild.
* gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
doesn't define elf_fpregset_t.
|
|
The Python CFLAGS include -DNDEBUG. This was apparently done
intentionally -- setting the flags is done manually because, according
to a comment, python-config passes too many things to the compiler
(which is true).
Per PR python/20445, this patch changes configure so that -DNDEBUG is
only used by release builds. This probably doesn't have very much
effect in practice, but I did see that some Python headers use assert,
so perhaps it will give some safety.
Tested by rebuilding and re-running gdb.python/*.exp on x86-64 Fedora 28.
gdb/ChangeLog
2018-09-17 Tom Tromey <tom@tromey.com>
PR python/20445:
* configure: Rebuild.
* configure.ac: Conditionally use -DNDEBUG for Python.
|
|
There was a report on irc that the gdb check for mpfr failed when only
static libraries are available. The issue is that mpfr depends on
gmp, but this is not handled explicitly by gdb.
Ideally upstream would switch to pkg-config. Or even more ideally, we
would incorporate pkg-config into the compiler and not mess with any
of this.
Meanwhile, this changes gdb's configure to add gmp to the link line
when checking for mpfr.
gdb/ChangeLog
2018-09-17 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* configure.ac: Use gmp as a library dependency when checking for
mpfr.
|
|
gdb's configure script accepts --enable-multi-ice, but the code this
refers to is long gone. This patch removes the option entirely.
gdb/ChangeLog
2018-09-04 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* configure.ac: Remove multi-ice code.
|
|
configure checks for declarations of free, malloc, and realloc; but
the results are only used in a single spot: utils.c. I think these
checks are long since obsolete, so this patch removes them.
Grepping the entire tree for these HAVE_DECL_ symbols, the only uses
of possible interest to gdb come from bfd/sysdep.h; but this is not
(nor should be) included by gdb. (And furthermore I think the code
there is probably also obsolete.)
gdb/ChangeLog
2018-07-24 Tom Tromey <tom@tromey.com>
* utils.c (malloc, realloc, free): Don't declare.
* configure, config.in: Rebuild.
* configure.ac: Don't check for declarations of free, malloc, or
realloc.
|
|
I think it doesn't really make sense to allow building gdb without the
CLI. Perhaps at one time this was a goal, but libgdb is long gone and
the CLI is intrinsic to gdb.
So, this patch removes the implementation of this configure option.
It is still recognized (this is autoconf's default), but does nothing.
This simplifies configure.ac and Makefile.in a bit.
Tested by rebuilding.
gdb/ChangeLog
2018-07-17 Tom Tromey <tom@tromey.com>
* configure.ac: Remove --disable-gdbcli.
* configure: Rebuild.
* Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
(SUBDIR_CLI_CFLAGS): Remove.
(SFILES): Use SUBDIR_CLI_SRCS.
(COMMON_OBS): Use SUBDIR_CLI_OBS.
|
|
macOS requires that the gdb executable be signed in order to be able
to successfully use ptrace. This must be done after each link.
This patch adds a new --enable-codesign configure option so that this
step can be automated.
gdb/ChangeLog
2018-06-28 Tom Tromey <tom@tromey.com>
* NEWS: Mention --enable-codesign.
* silent-rules.mk (ECHO_SIGN): New variable.
* configure.ac: Add --enable-codesign.
* configure: Rebuild.
* Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
(gdb$(EXEEXT)): Optionally invoke codesign.
|
|
I have thought for a long time how nice it would be to have cool pretty
printers for GDB's internal types. Well, turns out there are few
already in gdb-gdb.py! Unfortunately, if you build GDB outside of the
source directory, that file never gets loaded. top-gdb will look for a
file called
../path/to/build/gdb/gdb-gdb.py
but that file is in the source directory at
../path/to/src/gdb/gdb-gdb.py
This patch makes it so we copy it to the build directory, just like we
do for gdb-gdb.gdb. With this, I can at least see the file getting
automatically loaded:
(top-gdb) info pretty-printer
global pretty-printers:
builtin
mpx_bound128
objfile /home/emaisin/build/binutils-gdb/gdb/gdb pretty-printers:
type_lookup_function
I noticed that running "make" didn't re-generate gdb-gdb.py from
gdb-gdb.py.in. That's because it's copied when running the configure
script and that's it. I added a rule in the Makefile for that (and for
gdb-gdb.gdb too) and added them as a dependency to the "all" target.
gdb/ChangeLog:
* gdb-gdb.py: Move to...
* gdb-gdb.py.in: ... here.
* configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
* Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
dependencies.
(distclean): Remove gdb-gdb.py when cleaning.
(gdb-gdb.py, gdb-gdb.gdb): New rules.
* configure: Re-generate.
|
|
When trying to run the update-gnulib.sh script in gdb, I get this:
Error: Wrong automake version (Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^ =:+{}]+)}/ at /opt/automake/1.11.1/bin/automake line 4113.), we need 1.11.1.
Aborting.
Apparently, it's an issue with a regex in automake that triggers a
warning starting with Perl 5.22. It has been fixed in automake 1.15.1.
So I think it's a good excuse to bump the versions of autoconf and
automake used in the gnulib import. And to avoid requiring multiple
builds of autoconf/automake, it was suggested that we bump the required
version of those tools for all binutils-gdb.
For autoconf, the 2.69 version is universally available, so it's an easy
choice. For automake, different distros and distro versions have
different automake versions. But 1.15.1 seems to be the most readily
available as a package. In any case, it's easy to build it from source.
I removed the version checks from AUTOMAKE_OPTIONS and AC_PREREQ,
because I don't think they are useful in our case. They only specify a
lower bound for the acceptable version of automake/autoconf. That's
useful if you let the user choose the version of the tool they want to
use, but want to set a minimum version (because you use a feature that
was introduced in that version). In our case, we force people to use a
specific version anyway. For the autoconf version, we have the check in
config/override.m4 that enforces the version we want. It will be one
less thing to update next time we change autotools version.
I hit a few categories of problems that required some changes. They are
described below along with the chosen solutions.
Problem 1:
configure.ac:17: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated. For more info, see:
configure.ac:17: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
Solution 1:
Adjust the code based on the example at that URL.
Problem 2 (in zlib/):
Makefile.am: error: required file './INSTALL' not found
Makefile.am: 'automake --add-missing' can install 'INSTALL'
Makefile.am: error: required file './NEWS' not found
Makefile.am: error: required file './AUTHORS' not found
Makefile.am: error: required file './COPYING' not found
Makefile.am: 'automake --add-missing' can install 'COPYING'
Solution 2:
Add the foreign option to AUTOMAKE_OPTIONS.
Problem 3:
doc/Makefile.am:20: error: support for Cygnus-style trees has been removed
Solution 3:
Remove the cygnus options.
Problem 4:
Makefile.am:656: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
Solution 4:
Rename "INCLUDES = " to "AM_CPPFLAGS += " (because AM_CPPFLAGS is
already defined earlier).
Problem 5:
doc/Makefile.am:71: warning: suffix '.texinfo' for Texinfo files is discouraged; use '.texi' instead
doc/Makefile.am: warning: Oops!
doc/Makefile.am: It appears this file (or files included by it) are triggering
doc/Makefile.am: an undocumented, soon-to-be-removed automake hack.
doc/Makefile.am: Future automake versions will no longer place in the builddir
doc/Makefile.am: (rather than in the srcdir) the generated '.info' files that
doc/Makefile.am: appear to be cleaned, by e.g. being listed in CLEANFILES or
doc/Makefile.am: DISTCLEANFILES.
doc/Makefile.am: If you want your '.info' files to be placed in the builddir
doc/Makefile.am: rather than in the srcdir, you have to use the shiny new
doc/Makefile.am: 'info-in-builddir' automake option.
Solution 5:
Rename .texinfo files to .texi.
Problem 6:
doc/Makefile.am: warning: Oops!
doc/Makefile.am: It appears this file (or files included by it) are triggering
doc/Makefile.am: an undocumented, soon-to-be-removed automake hack.
doc/Makefile.am: Future automake versions will no longer place in the builddir
doc/Makefile.am: (rather than in the srcdir) the generated '.info' files that
doc/Makefile.am: appear to be cleaned, by e.g. being listed in CLEANFILES or
doc/Makefile.am: DISTCLEANFILES.
doc/Makefile.am: If you want your '.info' files to be placed in the builddir
doc/Makefile.am: rather than in the srcdir, you have to use the shiny new
doc/Makefile.am: 'info-in-builddir' automake option.
Solution 6:
Remove the hack at the bottom of doc/Makefile.am and use
the info-in-builddir automake option.
Problem 7:
doc/Makefile.am:35: error: required file '../texinfo.tex' not found
doc/Makefile.am:35: 'automake --add-missing' can install 'texinfo.tex'
Solution 7:
Use the no-texinfo.tex automake option. We also have one in
texinfo/texinfo.tex, not sure if we should point to that, or move it
(or a newer version of it added with automake --add-missing) to
top-level.
Problem 8:
Makefile.am:131: warning: source file 'config/tc-aarch64.c' is in a subdirectory,
Makefile.am:131: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled. For now, the corresponding output
automake: object file(s) will be placed in the top-level directory. However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
Solution 8:
Use subdir-objects, that means adjusting references to some .o that will now
be in config/.
Problem 9:
configure.ac:375: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2601: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2617: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2042: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2063: AC_CACHE_CHECK is expanded from...
configure.ac:375: the top level
Solution 9:
Use AC_LANG_SOURCE, or use proper quoting.
Problem 10 (in intl/):
configure.ac:7: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
/usr/share/aclocal/threadlib.m4:36: gl_THREADLIB_EARLY_BODY is expanded from...
/usr/share/aclocal/threadlib.m4:29: gl_THREADLIB_EARLY is expanded from...
/usr/share/aclocal/threadlib.m4:318: gl_THREADLIB is expanded from...
/usr/share/aclocal/lock.m4:9: gl_LOCK is expanded from...
/usr/share/aclocal/intl.m4:211: gt_INTL_SUBDIR_CORE is expanded from...
/usr/share/aclocal/intl.m4:25: AM_INTL_SUBDIR is expanded from...
/usr/share/aclocal/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
configure.ac:7: the top level
Solution 10:
Add AC_USE_SYSTEM_EXTENSIONS in configure.ac.
ChangeLog:
* libtool.m4: Use AC_LANG_SOURCE.
* configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE.
* README-maintainer-mode: Update version requirements.
* ar-lib: New file.
* test-driver: New file.
* configure: Re-generate.
bfd/ChangeLog:
* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
(INCLUDES): Rename to ...
(AM_CPPFLAGS): ... this.
* configure.ac: Remove AC_PREREQ.
* doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
info-in-builddir no-texinfo.tex.
(info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
* doc/bfd.texinfo: Rename to ...
* doc/bfd.texi: ... this.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* config.in: Re-generate.
* configure: Re-generate.
* doc/Makefile.in: Re-generate.
binutils/ChangeLog:
* configure.ac: Remove AC_PREREQ.
* doc/Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, add
info-in-builddir no-texinfo.tex.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* config.in: Re-generate.
* configure: Re-generate.
* doc/Makefile.in: Re-generate.
config/ChangeLog:
* override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69.
etc/ChangeLog:
* configure.in: Remove AC_PREREQ.
* configure: Re-generate.
gas/ChangeLog:
* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11, add subdir-objects.
(TARG_CPU_O, OBJ_FORMAT_O, ATOF_TARG_O): Add config/ prefix.
* configure.ac (TARG_CPU_O, OBJ_FORMAT_O, ATOF_TARG_O, emfiles,
extra_objects): Add config/ prefix.
* doc/as.texinfo: Rename to...
* doc/as.texi: ... this.
* doc/Makefile.am: Rename as.texinfo to as.texi throughout.
Remove DISTCLEANFILES hack.
(AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add no-texinfo.tex and
info-in-builddir.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* config.in: Re-generate.
* configure: Re-generate.
* doc/Makefile.in: Re-generate.
gdb/ChangeLog:
* common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
* configure.ac: Remove AC_PREREQ, add missing quoting.
* gnulib/configure.ac: Modernize usage of
AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
* gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
(AUTOMAKE_VERSION): Bump to 1.15.1.
* configure: Re-generate.
* config.in: Re-generate.
* aclocal.m4: Re-generate.
* gnulib/aclocal.m4: Re-generate.
* gnulib/config.in: Re-generate.
* gnulib/configure: Re-generate.
* gnulib/import/Makefile.in: Re-generate.
gdb/gdbserver/ChangeLog:
* configure.ac: Remove AC_PREREQ, add missing quoting.
* configure: Re-generate.
* config.in: Re-generate.
* aclocal.m4: Re-generate.
gdb/testsuite/ChangeLog:
* configure.ac: Remove AC_PREREQ.
* configure: Re-generate.
gold/ChangeLog:
* configure.ac: Remove AC_PREREQ, add missing quoting and usage
of AC_LANG_SOURCE.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* configure: Re-generate.
* testsuite/Makefile.in: Re-generate.
gprof/ChangeLog:
* configure.ac: Remove AC_PREREQ.
* Makefile.am: Remove DISTCLEANFILES hack.
(AUTOMAKE_OPTIONS): Remove 1.11, add info-in-builddir.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* configure: Re-generate.
* gconfig.in: Re-generate.
intl/ChangeLog:
* configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ.
* configure: Re-generate.
* config.h.in: Re-generate.
* aclocal.m4: Re-generate.
ld/ChangeLog:
* configure.ac: Remove AC_PREREQ.
* Makefile.am: Remove DISTCLEANFILES hack, rename ld.texinfo to
ld.texi, ldint.texinfo to ldint.texi throughout.
(AUTOMAKE_OPTIONS): Add info-in-builddir.
* README: Rename ld.texinfo to ld.texi, ldint.texinfo to
ldint.texi throughout.
* gen-doc.texi: Likewise.
* h8-doc.texi: Likewise.
* ld.texinfo: Rename to ...
* ld.texi: ... this.
* ldint.texinfo: Rename to ...
* ldint.texi: ... this.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* config.in: Re-generate.
* configure: Re-generate.
libdecnumber/ChangeLog:
* configure.ac: Remove AC_PREREQ.
* configure: Re-generate.
* aclocal.m4.
libiberty/ChangeLog:
* configure.ac: Remove AC_PREREQ.
* configure: Re-generate.
* config.in: Re-generate.
opcodes/ChangeLog:
* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
* configure.ac: Remove AC_PREREQ.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* configure: Re-generate.
readline/ChangeLog.gdb:
* configure: Re-generate.
* examples/rlfe/configure: Re-generate.
sim/ChangeLog:
* All configure.ac: Remove AC_PREREQ.
* All configure: Re-generate.
zlib/ChangeLog.bin-gdb:
* configure.ac: Modernize AC_INIT call, remove AC_PREREQ.
* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add
foreign.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* configure: Re-generate.
|
|
References:
https://stackoverflow.com/a/49868387
https://sourceware.org/bugzilla/show_bug.cgi?id=11420
Configure uses "gcc -o conftest -g ... conftest.c -ldl -lncurses -lm -ldl
... -lpthread ... -lpython2.7" when deciding whether give libpython is
usable.
That of course is the wrong link order, and only works for shared libraries
(mostly by accident), and only on some systems.
gdb/ChangeLog:
PR gdb/11420
* configure.ac: Prepend libpython.
* python/python-config.py: Likewise.
* configure: Regenerate.
|
|
gdb/
* Makefile.in: (COMMON_SFILES): Add common/*.c files.
(SFILES): Remove common/*.c files.
(COMMON_OBS): Remove some *.o files built from common/*.c files.
* common/common.host: Add common reference.
* configure.ac: Likewise.
* configure: Regenerate.
gdbserver/
* Makefile.in: Add common directory in build.
* configure.ac: Add common reference.
* configure: Regenerate.
|
|
In my multi-target branch I ran into problems with GDB's terminal
handling that exist in master as well, with multi-inferior debugging.
This patch adds a testcase for said problems
(gdb.multi/multi-term-settings.exp), fixes the problems, fixes PR
gdb/13211 as well (and adds a testcase for that too,
gdb.base/interrupt-daemon.exp).
The basis of the problem I ran into is the following. Consider a
scenario where you have:
- inferior 1 - started with "attach", process is running on some
other terminal.
- inferior 2 - started with "run", process is sharing gdb's terminal.
In this scenario, when you stop/resume both inferiors, you want GDB to
save/restore the terminal settings of inferior 2, the one that is
sharing GDB's terminal. I.e., you want inferior 2 to "own" the
terminal (in target_terminal::is_ours/target_terminal::is_inferior
sense).
Unfortunately, that's not what you get currently. Because GDB doesn't
know whether an attached inferior is actually sharing GDB's terminal,
it tries to save/restore its settings anyway, ignoring errors. In
this case, this is pointless, because inferior 1 is running on a
different terminal, but GDB doesn't know better.
And then, because it is only possible to have the terminal settings of
a single inferior be in effect at a time, or make one inferior/pgrp be
the terminal's foreground pgrp (aka, only one inferior can "own" the
terminal, ignoring fork children here), if GDB happens to try to
restore the terminal settings of inferior 1 first, then GDB never
restores the terminal settings of inferior 2.
This patch fixes that and a few things more along the way:
- Moves enum target_terminal::terminal_state out of the
target_terminal class (it's currently private) and makes it a
scoped enum so that it can be easily used elsewhere.
- Replaces the inflow.c:terminal_is_ours boolean with a
target_terminal_state variable. This allows distinguishing is_ours
and is_ours_for_output states. This allows finally making
child_terminal_ours_1 do something with its "output_only"
parameter.
- Makes each inferior have its own copy of the
is_ours/is_ours_for_output/is_inferior state.
- Adds a way for GDB to tell whether the inferior is sharing GDB's
terminal. Works best on Linux and Solaris; the fallback works just
as well as currently.
- With that, we can remove the inf->attach_flag tests from
child_terminal_inferior/child_terminal_ours.
- Currently target_ops.to_ours is responsible for both saving the
current inferior's terminal state, and restoring gdb's state.
Because each inferior has its own terminal state (possibly handled
by different targets in a multi-target world, even), we need to
split the inferior-saving part from the gdb-restoring part. The
patch adds a new target_ops.to_save_inferior target method for
that.
- Adds a new target_terminal::save_inferior() function, so that
sequences like:
scoped_restore_terminal_state save_state;
target_terminal::ours_for_output ();
... restore back inferiors that were
target_terminal_state::is_inferior before back to is_inferior, and
leaves inferiors that were is_ours alone.
- Along the way, this adds a default implementation of
target_pass_ctrlc to inflow.c (for inf-child.c), that handles
passing the Ctrl-C to a process running on GDB's terminal or to
some other process otherwise.
- Similarly, adds a new target default implementation of
target_interrupt, for the "interrupt" command. The current
implementation of this hook in inf-ptrace.c kills the whole process
group, but that's incorrect/undesirable because we may not be
attached to all processes in the process group. And also, it's
incorrect because inferior_process_group() doesn't really return
the inferior's real process group id if the inferior is not a
process group leader... This is the cause of PR gdb/13211 [1],
which this patch fixes. While at it, that target method's "ptid"
parameter is eliminated, because it's not really used.
- A new test is included that exercises and fixes PR gdb/13211, and
also fixes a GDB issue reported on stackoverflow that I ran into
while working on this [2]. The problem is similar to PR gdb/13211,
except that it also triggers with Ctrl-C. When debugging a daemon
(i.e., a process that disconnects from the controlling terminal and
is not a process group leader, then Ctrl-C doesn't work, you just
can't interrupt the inferior at all, resulting in a hung debug
session. The problem is that since the inferior is no longer
associated with gdb's session / controlling terminal, then trying
to put the inferior in the foreground fails. And so Ctrl-C never
reaches the inferior directly. pass_signal is only used when the
inferior is attached, but that is not the case here. This is fixed
by the new child_pass_ctrlc. Without the fix, the new
interrupt-daemon.exp testcase fails with timeout waiting for a
SIGINT that never arrives.
[1] PR gdb/13211 - Async / Process group and interrupt not working
https://sourceware.org/bugzilla/show_bug.cgi?id=13211
[2] GDB not reacting Ctrl-C when after fork() and setsid()
https://stackoverflow.com/questions/46101292/gdb-not-reacting-ctrl-c-when-after-fork-and-setsid
Note this patch does _not_ fix:
- PR gdb/14559 - The 'interrupt' command does not work if sigwait is in use
https://sourceware.org/bugzilla/show_bug.cgi?id=14559
- PR gdb/9425 - When using "sigwait" GDB doesn't trap SIGINT. Ctrl+C terminates program when should break gdb.
https://sourceware.org/bugzilla/show_bug.cgi?id=9425
The only way to fix that that I know of (without changing the kernel)
is to make GDB put inferiors in a separate session (create a
pseudo-tty master/slave pair, make the inferior run with the slave as
its terminal, and have gdb pump output/input on the master end).
gdb/ChangeLog:
2018-01-30 Pedro Alves <palves@redhat.com>
PR gdb/13211
* config.in, configure: Regenerate.
* configure.ac: Check for getpgid.
* go32-nat.c (go32_pass_ctrlc): New.
(go32_target): Install it.
* inf-child.c (inf_child_target): Install
child_terminal_save_inferior, child_pass_ctrlc and
child_interrupt.
* inf-ptrace.c (inf_ptrace_interrupt): Delete.
(inf_ptrace_target): No longer install it.
* infcmd.c (interrupt_target_1): Adjust.
* inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
(child_interrupt): Declare.
(inferior::terminal_state): New.
* inflow.c (struct terminal_info): Update comments.
(inferior_process_group): Delete.
(terminal_is_ours): Delete.
(gdb_tty_state): New.
(child_terminal_init): Adjust.
(is_gdb_terminal, sharing_input_terminal_1)
(sharing_input_terminal): New functions.
(child_terminal_inferior): Adjust. Use sharing_input_terminal.
Set the process's actual process group in the foreground if
possible. Handle is_ours_for_output/is_ours distinction. Don't
mark terminal as the inferior's if not sharing GDB's terminal.
Don't check attach_flag.
(child_terminal_ours_for_output, child_terminal_ours): Adjust to
pass down a target_terminal_state.
(child_terminal_save_inferior): New, factored out from ...
(child_terminal_ours_1): ... this. Handle
target_terminal_state::is_ours_for_output.
(child_interrupt, child_pass_ctrlc): New.
(inflow_inferior_exit): Clear the inferior's terminal_state.
(copy_terminal_info): Copy the inferior's terminal state.
(_initialize_inflow): Remove reference to terminal_is_ours.
* inflow.h (inferior_process_group): Delete.
* nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
* procfs.c (procfs_target): Don't install procfs_interrupt.
(procfs_interrupt): Delete.
* remote.c (remote_serial_quit_handler): Adjust.
(remote_interrupt): Remove ptid parameter. Adjust.
* target-delegates.c: Regenerate.
* target.c: Include "terminal.h".
(target_terminal::terminal_state): Rename to ...
(target_terminal::m_terminal_state): ... this.
(target_terminal::init): Adjust.
(target_terminal::inferior): Adjust to per-inferior
terminal_state.
(target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
(target_terminal::ours, target_terminal::ours_for_output): Use
target_terminal_is_ours_kind.
(target_interrupt): Remove ptid parameter. Adjust.
(default_target_pass_ctrlc): Adjust.
* target.h (target_ops::to_terminal_save_inferior): New field.
(target_ops::to_interrupt): Remove ptid_t parameter.
(target_interrupt): Remove ptid_t parameter. Update comment.
(target_pass_ctrlc): Update comment.
* target/target.h (target_terminal_state): New scoped enum,
factored out of ...
(target_terminal::terminal_state): ... here.
(target_terminal::inferior): Update comments.
(target_terminal::restore_inferior): New.
(target_terminal::is_inferior, target_terminal::is_ours)
(target_terminal::is_ours_for_output): Adjust.
(target_terminal::scoped_restore_terminal_state): Adjust to
rename, and call restore_inferior() instead of inferior().
(target_terminal::scoped_restore_terminal_state::m_state): Change
type.
(target_terminal::terminal_state): Rename to ...
(target_terminal::m_terminal_state): ... this and change type.
gdb/gdbserver/ChangeLog:
2018-01-30 Pedro Alves <palves@redhat.com>
PR gdb/13211
* target.c (target_terminal::terminal_state): Rename to ...
(target_terminal::m_terminal_state): ... this.
gdb/testsuite/ChangeLog:
2018-01-30 Pedro Alves <palves@redhat.com>
PR gdb/13211
* gdb.base/interrupt-daemon.c: New.
* gdb.base/interrupt-daemon.exp: New.
* gdb.multi/multi-term-settings.c: New.
* gdb.multi/multi-term-settings.exp: New.
|
|
Make <sys/types.h> be included prior to including <sys/user.h>.
glibc versions older than 2.14 use __uintNN_t types within certain
structures defined in <sys/user.h> probably assuming these types are
defined prior to including the header. This results in the following
`configure` feature test compilation error that makes it think that
`struct user_regs_struct` doesn't have `fs_base`/`gs_base` fields,
althouh it does.
configure:13617: checking for struct user_regs_struct.fs_base
configure:13617: gcc -c -g -O2 -I/linux/include conftest.c >&5
In file included from conftest.c:158:0:
/usr/include/sys/user.h:32:3: error: unknown type name '__uint16_t'
__uint16_t cwd;
^
/usr/include/sys/user.h:33:3: error: unknown type name '__uint16_t'
__uint16_t swd;
^
/usr/include/sys/user.h:34:3: error: unknown type name '__uint16_t'
__uint16_t ftw;
^
/usr/include/sys/user.h:35:3: error: unknown type name '__uint16_t'
__uint16_t fop;
^
/usr/include/sys/user.h:36:3: error: unknown type name '__uint64_t'
__uint64_t rip;
^
/usr/include/sys/user.h:37:3: error: unknown type name '__uint64_t'
__uint64_t rdp;
^
/usr/include/sys/user.h:38:3: error: unknown type name '__uint32_t'
__uint32_t mxcsr;
^
/usr/include/sys/user.h:39:3: error: unknown type name '__uint32_t'
__uint32_t mxcr_mask;
^
/usr/include/sys/user.h:40:3: error: unknown type name '__uint32_t'
__uint32_t st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
^
/usr/include/sys/user.h:41:3: error: unknown type name '__uint32_t'
__uint32_t xmm_space[64]; /* 16*16 bytes for each XMM-reg = 256 bytes */
^
/usr/include/sys/user.h:42:3: error: unknown type name '__uint32_t'
__uint32_t padding[24];
^
configure:13617: $? = 1
configure: failed program was:
| /* confdefs.h */
...
| /* end confdefs.h. */
| #include <sys/user.h>
|
| int
| main ()
| {
| static struct user_regs_struct ac_aggr;
| if (ac_aggr.fs_base)
| return 0;
| ;
| return 0;
| }
Recent glibc versions don't use typedef'ed int types in <sys/user.h>,
thus allowing it to be included as is
(glibc commit d79a9c949c84e7f0ba33e87447c47af833e9f11a).
However there're still some distros alive that use older glibc,
for instance, RHEL/CentOS 6 package glibc 2.12.
Also affects PR gdb/21559:
../../gdb/regcache.c:1087: internal-error: void regcache_raw_supply(regcache, int, const void): Assertion `regnum >= 0 && regnum < regcache->descr->nr_raw_registers' failed.
As noted by Andrew Paprocki, who submitted the PR
(https://sourceware.org/bugzilla/show_bug.cgi?id=21559#c3):
> It should be noted that modifying `configure` to force on
> `HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE` and
> `HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE` fixes this issue. For some
> reason the `configure` tests for `fs_base` and `gs_base` fail
> even though `sys/user.h` on RHEL5 has the fields defined in
> `user_regs_struct`.
Note that this patch does NOT fix the root cause of PR gdb/21559,
although now that `configure` properly detects the presence of the
fields and sets HAVE_XXX accordingly, the execution takes another
path, which doesn't lead to the assertion failure in question.
gdb/ChangeLog:
2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
PR gdb/21559
* configure.ac: Include <sys/types.h> prior to <sys/user.h> when
checking for fs_base/gs_base fields in struct user_regs_struct.
* configure: Regenerate.
gdb/gdbserver/ChangeLog:
2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
PR gdb/21559
* configure.ac: Include <sys/types.h> prior to <sys/user.h> when
checking for fs_base/gs_base fields in struct user_regs_struct.
* configure: Regenerate.
|
|
- Command line arguments are fetched via the kern.proc.args.<pid>
sysctl.
- The 'cwd' and 'exe' values are obtained from the per-process
file descriptor table returned by kinfo_getfile() from libutil.
- 'mappings' is implemented by walking the array of VM map entries
returned by kinfo_getvmmap() from libutil.
- 'status' output is generated by outputting fields from the structure
returned by the kern.proc.pid.<pid> sysctl.
- 'stat' is aliased to 'status'.
gdb/ChangeLog:
* configure.ac: Check for kinfo_getfile in libutil.
* configure: Regenerate.
* config.in: Regenerate.
* fbsd-nat.c: Include "fbsd-tdep.h".
(fbsd_fetch_cmdline): New.
(fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
rather than calling error.
(fbsd_info_proc): New.
(fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
(fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
(fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
|
|
We don't build GDB selftests bits when $development is false. However, if
we turn bfd/development.sh:$development to false, common/selftest.c is
compiled which is not expected. It causes the build failure,
selftest.o: In function `selftests::run_tests(char const*)':
binutils-gdb/gdb/common/selftest.c:97: undefined reference to `selftests::reset()'
collect2: error: ld returned 1 exit status
I fix this issue by putting selftest.o selftest-arch.o into CONFIG_OBS
only when $development is true. After this is fixed, there are other
build failures in maint.c, this patch fixes them as well.
In the release mode, the output of these commands are:
(gdb) maintenance selftest
Selftests are not available in a non-development build.
(gdb) maintenance selftest foo
Selftests are not available in a non-development build.
(gdb) maintenance info selftests
Selftests are not available in a non-development build.
gdb:
2018-01-08 Yao Qi <yao.qi@linaro.org>
Simon Marchi <simon.marchi@ericsson.com>
* Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
common/selftest.c.
(COMMON_OBS): Remove selftest.o.
* configure.ac: Append selftest-arch.c and common/selftest.c to
CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
* configure: Re-generated.
* maint.c (maintenance_selftest): Wrap selftests::run_tests with
GDB_SELF_TEST.
(maintenance_info_selftests): Likewise.
gdb/testsuite:
2018-01-08 Simon Marchi <simon.marchi@ericsson.com>
* gdb.gdb/unittest.exp: Match output in non-development mode.
|
|
gdb/ChangeLog:
Update copyright year range in all GDB files
|
|
This is the previously mentioned patch to get rid of
unstructured/ioctl-based procfs support in procfs.c. Given that support
for structured procfs was introduced in Solaris 2.6 back in 1997 and
we're just removing support for Solaris < 10, there's no point in
carrying that baggage (and tons of support for IRIX and OSF/1 as well)
around any longer.
Most of the patch should be straightforward (removing support for
!NEW_PROC_API, non-Solaris OSes and pre-Solaris 10 quirks).
Only a few points need explanations:
* <sys/syscall.h> was already included unconditionally in most places,
so there's no need to have guards in a few remaining ones.
* configure.host already obsoletes i?86-*-sysv4.2, i?86-*-sysv5, so
NEW_PROC_API detection for those in configure.ac can go.
* I'm still including <sys/procfs.h> with #define _STRUCTURED_PROC 1.
Theoretically, it would be better to include <procfs.h> on Solaris
(which includes that define), but that breaks the build over
<procfs.h> vs. gdb's "procfs.h", and doesn't exist on Linux.
* I've regenerated syscall_table[] in proc-events.c with a small script
from Solaris 10, 11.3, 11.4 <sys/syscall.h>, so there should be no
traces of older Solaris versions and other OSes left.
* prsysent_t and DYNAMIC_SYSCALLS was only used for AIX 5, but AIX
doesn't use procfs.c any longer, so all related code can go.
The patch was generated with diff -w so one can easier see changes
without being distracted by simple reindentations.
So far, it has only been compiled and smoke-tested on
amd64-pc-solaris2.1[01], sparcv9-sun-solaris2.1[01], and
x86_64-pc-linux-gnu. Certainly needs more testing (Solaris 11.3
vs. 11.4, 32-bit gdb, testsuite once I've figured out what's wrong on
Solaris 10 etc.), but it's enough to get a first impression how much
cleanup is possible here.
* configure.ac Don't check for sys/fault.h, sys/syscall.h,
sys/proc.h.
(NEW_PROC_API): Remove.
(prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
Likewise.
* common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
* configure: Regenerate.
* config.in: Regenerate.
* gdbserver/configure: Regenerate.
* gdbserver/config.in: Regenerate.
* i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
NEW_PROC_API test.
* sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
* linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
* proc-api.c: Remove !NEW_PROC_API support.
Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
Remove tests for macros always defined on Solaris.
* proc-events.c: Remove !NEW_PROC_API support.
Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
HAVE_SYS_USER_H tests.
(init_syscall_table): Remove non-Solaris syscalls.
Remove tests for syscalls present on all Solaris versions.
Add missing Solaris 10+ syscalls.
(signal_table): Remove non-Solaris signals.
Remove tests for signals present on all Solaris versions.
(fault_table): Remove non-Solaris faults.
Remove tests for faults present on all Solaris versions.
* proc-flags.c: Remove !NEW_PROC_API support.
(pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
Remove non-Solaris flags.
* proc-why.c: Remove !NEW_PROC_API support.
(pr_why_table): Remove meaningless comments.
Remove tests for reasons present on all Solaris versions.
Remove OSF/1 cases.
(proc_prettyfprint_why): Likewise.
* procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
Remove WA_READ test, IRIX watchpoint support.
(gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
types. Change users.
(gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
(gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
Change callers.
Remove CTL_PROC_NAME_FMT tests.
(gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
users.
(sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
(proc_modify_flag): Replace GDBRESET by PCUNSET.
Remove PR_ASYNC, PR_KLC tests.
(proc_unset_inherit_on_fork): Remove PR_ASYNC test.
(proc_parent_pid): Remove PCWATCH etc. tests.
(proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
Remove PCAGENT test.
(proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
Remove SYS_lwpcreate || SYS_lwp_create test.
(proc_get_current_thread): Likewise.
[PIOCNTHR && PIOCTLIST]: Remove.
[PIOCLSTATUS]: Remove.
(procfs_debug_inferior): Remove non-Solaris cases, conditionals.
[PRFS_STOPEXEC]: Remove.
(syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
(syscall_is_exit): Likewise.
(syscall_is_exec): Likewise.
(syscall_is_lwp_create): Likewise.
Remove SYS_syssgi support.
(procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
[SYS_syssgi]: Remove.
Remove non-Solaris cases, conditionals.
(unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
Remove.
(procfs_init_inferior) [SYS_syssgi]: Remove.
(procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
(procfs_inferior_created) [SYS_syssgi]: Remove.
(procfs_set_watchpoint): Remove !AIX5 test.
(procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
case.
(mappingflags) [MA_PHYS]: Remove.
(info_mappings_callback): Remove PCAGENT test.
Remove PIOCOPENLWP || PCAGENT test.
|
|
Move the object files corresponding to python/*.c to the python
subdirectory in the build tree.
Because special CFLAGS are passed just to Python compilations, this
patch also required the addition of a pattern rule to update
INTERNAL_CFLAGS for here.
ChangeLog
2017-11-27 Tom Tromey <tom@tromey.com>
* Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
(CONFIG_SRC_SUBDIR): Add python.
(%.o): Remove python rule.
(python/%.o): New rule.
* configure: Rebuild.
* configure.ac (CONFIG_OBS): Refer to python/python.o
|
|
Move the object files corresponding to guile/*.c to the guile
subdirectory in the build tree.
ChangeLog
2017-11-27 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* configure.ac (CONFIG_OBS): Refer to guile/guile.o.
* Makefile.in (SUBDIR_GUILE_OBS): Redefine.
(CONFIG_SRC_SUBDIR): Add guile.
(%.o): Remove guile rule.
|
|
This implements a simpler way to make the "arch" build directory --
namely, now it is done as an order-only dependency in the Makefile,
rather than being created when config.status is run. This simpler
because it means that the build directories can be changed without
re-running autoconf.
ChangeLog
2017-11-27 Tom Tromey <tom@tromey.com>
* configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
* configure: Rebuild.
* Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
(CONFIG_DEP_SUBDIR): New variable.
(%.o): Add order-only dependency.
($(CONFIG_DEP_SUBDIR)): New target.
|
|
This second patch introduces mfpr_float_ops, an new implementation
of target_float_ops. This implements precise emulation of target
floating-point formats using the MPFR library. This is then used
to perform operations on types that do not match any host type.
Note that use of MPFR is still not required. The patch adds
a configure option --with-mpfr similar to --with-expat. If use of
MPFR is disabled via the option or MPFR is not available, code will
fall back to current behavior. This means that operations on types
that do not match any host type will be implemented on the host
long double type instead.
A new test case verifies that we can correctly print the largest
__float128 value now.
gdb/ChangeLog:
2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
* NEWS: Document use of GNU MPFR.
* README: Likewise.
* Makefile.in (LIBMPFR): Add define.
(CLIBS): Add $(LIBMPFR).
* configure.ac: Add --with-mpfr configure option.
* configure: Regenerate.
* config.in: Regenerate.
* target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
(class mpfr_float_ops): New type.
(mpfr_float_ops::from_target): Two new overloaded functions.
(mpfr_float_ops::to_target): Likewise.
(mpfr_float_ops::to_string): New function.
(mpfr_float_ops::from_string): Likewise.
(mpfr_float_ops::to_longest): Likewise.
(mpfr_float_ops::from_longest): Likewise.
(mpfr_float_ops::from_ulongest): Likewise.
(mpfr_float_ops::to_host_double): Likewise.
(mpfr_float_ops::from_host_double): Likewise.
(mpfr_float_ops::convert): Likewise.
(mpfr_float_ops::binop): Likewise.
(mpfr_float_ops::compare): Likewise.
(get_target_float_ops): Use mpfr_float_ops if available.
gdb/doc/ChangeLog:
2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
* gdb.texinfo (Requirements): Document use of GNU MPFR.
gdb/testsuite/ChangeLog:
2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
* gdb.base/float128.c (large128): New variable.
* gdb.base/float128.exp: Add test to print largest __float128 value.
|
|
This commit garbage collects the termio and sgtty support.
GDB's terminal handling code still has support for the old termio and
sgtty interfaces in addition to termios. However, I think it's pretty
safe to assume that for a long, long time, Unix-like systems provide
termios. GNU/Linux, Solaris, Cygwin, AIX, DJGPP, macOS and the BSDs
all have had termios.h for many years. Looking around the web, I
found discussions about FreeBSD folks trying to get rid of old sgtty.h
a decade ago:
https://lists.freebsd.org/pipermail/freebsd-hackers/2007-March/019983.html
So I think support for termio and sgtty in GDB is just dead code that
is never compiled anywhere and is just getting in the way. For
example, serial_noflush_set_tty_state and the raw<->cooked concerns
mentioned in inflow.c only exist because of sgtty (see
hardwire_noflush_set_tty_state).
Regtested on GNU/Linux.
Confirmed that I can still build Solaris, DJGPP and AIX GDB and that
the resulting GDBs still include the termios.h-guarded code.
Confirmed mingw-w64 GDB still builds and skips the termios.h-guarded
code.
gdb/ChangeLog:
2017-11-06 Pedro Alves <palves@redhat.com>
* Makefile.in (SER_HARDWIRE): Update comment.
(HFILES_NO_SRCDIR): Remove gdb_termios.h.
* common/gdb_termios.h: Delete file.
* common/job-control.c: Include termios.h and unistd.h instead of
gdb_termios.h.
(gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
check.
(have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
Remove sgtty code.
* configure.ac: No longer check for termio.h and sgtty.h.
* configure: Regenerate.
* inflow.c: Include termios.h instead of gdb_termios.h. Replace
PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
Replace PROCESS_GROUP_TYPE references with pid_t references
throughout.
(gdb_getpgrp): Delete.
(set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
(child_terminal_inferior): Remove comment. Remove sgtty code.
(child_terminal_ours_1): Use tcgetpgrp directly instead of
gdb_getpgrp. Use serial_set_tty_state instead aof
serial_noflush_set_tty_state. Remove sgtty code.
* inflow.h: Include unistd.h instead of gdb_termios.h. Replace
PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
(inferior_process_group): Now returns pid_t.
* ser-base.c (ser_base_noflush_set_tty_state): Delete.
* ser-base.h (ser_base_noflush_set_tty_state): Delete.
* ser-event.c (serial_event_ops): Update.
* ser-go32.c (dos_noflush_set_tty_state): Delete.
(dos_ops): Update.
* ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
* ser-pipe.c (pipe_ops): Update.
* ser-tcp.c (tcp_ops): Update.
* ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
HAVE_TERMIOS checks.
[HAVE_TERMIO] (struct hardwire_ttystate): Delete.
[HAVE_SGTTY] (struct hardwire_ttystate): Delete.
(get_tty_state, set_tty_state): Drop termio and sgtty code, and
assume termios.
(hardwire_noflush_set_tty_state): Delete.
(hardwire_print_tty_state, hardwire_drain_output)
(hardwire_flush_output, hardwire_flush_input)
(hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
(hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
code, and assume termios.
(hardwire_ops): Update.
(_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
* serial.c (serial_noflush_set_tty_state): Delete.
* serial.h (serial_noflush_set_tty_state): Delete.
(serial_ops::noflush_set_tty_state): Delete.
gdb/gdbserver/ChangeLog:
2017-11-06 Pedro Alves <palves@redhat.com>
* configure.ac: No longer check for termio.h and sgtty.h.
* configure: Regenerate.
* remote-utils.c: Include termios.h instead of gdb_termios.h.
(remote_open): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
Remove termio and sgtty code.
|
|
GDB currently doesn't build with Guile 2.2 (see PR 21104). If one has
both Guile 2.2 and 2.0 installed, GDB will pick up Guile 2.2 first and
fail building. Until somebody does the work of adapting the GDB code to
Guile 2.2, we should not try using it. This patch therefore removes it
from configure.
gdb/ChangeLog:
* configure.ac (try_guile_versions): Remove guile-2.2.
* configure: Regenerate.
|
|
Nowadays, GDB build tree is almost flat, but source tree isn't. We
have arch/ nat/ target/ common/ cli/ mi/ tui/ python/ guile/ directories.
We need to some rules in Makefile for source files in different source
directories, like,
# Rules for compiling .c files in the various source subdirectories.
%.o: ${srcdir}/arch/%.c
$(COMPILE) $<
$(POSTCOMPILE)
%.o: ${srcdir}/nat/%.c
$(COMPILE) $<
$(POSTCOMPILE)
so we should take care of some special case that files' base name is the
same, like,
# Specify an explicit rule for gdb/common/agent.c, to avoid a clash with the
# object file generate by gdb/agent.c.
common-agent.o: $(srcdir)/common/agent.c
$(COMPILE) $(srcdir)/common/agent.c
$(POSTCOMPILE)
As we add more and more files in different directories, it becomes tricky
to name files, because we need take this into account.
This patch takes the first step toward "Replicate src dir in build dir",
that is, we create arch/ directory in buildtree, and put amd64.o there
as an example. Dependency tracking is updated for files with directory
name. Currently, when we build amd64.o,
"-c -o amd64.o -MT amd64.o -MMD -MP -MF .deps/amd64.Tpo"
with this patch applied, it becomes,
"-c -o arch/amd64.o -MT arch/amd64.o -MMD -MP -MF arch/.deps/amd64.o.Tpo"
"make clean" removes the object files, and "make distclean" removes .deps
additionally. configure file create .deps directory in each of
CONFIG_SRC_SUBDIR, and pass it to Makefile.in, so that "make clean" and
"make distclean" can remove stuffs there.
If people agree with this change, I'll add more directories to
CONFIG_SRC_SUBDIR.
gdb:
2017-10-06 Yao Qi <yao.qi@linaro.org>
* Makefile.in (CONFIG_SRC_SUBDIR): New.
(ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
(clean): Remove object files and dependency files.
(distclean): Remove the directory.
* configure.ac: Invoke AC_CONFIG_COMMANDS.
* configure: Re-generated.
* configure.tgt: Replace amd64.o with arch/amd64.o.
|
|
Triggered by https://launchpad.net/bugs/1275210, to be able to cope
with UTF-8 characters in gdbtui.
Reference:
https://sourceware.org/ml/gdb-patches/2017-09/msg00356.html
gdb/ChangeLog:
2017-09-26 Matthias Klose <doko@ubuntu.com>
* configure.ac: Search ncursesw before ncurses.
Check ncursesw/ncurses.h before ncurses/ncurses.h.
* gdb_curses.h: Include <ncursesw/ncurses.h>
* config.in, configure: Regenerate.
|
|
Given that GCC has obsoleted/removed support for Solaris 9 in GCC 4.9/5 in 2013:
https://gcc.gnu.org/gcc-4.9/changes.html
https://gcc.gnu.org/ml/gcc-patches/2013-05/msg00728.html
and the last gdb version that can be compiled with gcc 4.9 is 7.12.1 only when
configured with --disable-build-with-cxx, it's time to obsolete/remove support
for Solaris < 10.
This patch does this, simplifying configure.nat along the way (only a single
sol2 configuration with variants for i386 and sparc).
Some configure checks for older Solaris versions can go, too, and the check
for libthread_db.so.1 removed:
* Since Solaris 10, dlopen has moved to libc and libdl.so is just a
filter on ld.so.1, so no need to check.
* $RDYNAMIC is already handled above (and is a no-op with Solaris ld
anyway).
Both proc-service.c and sol-thread.c lose support for (Solaris-only)
PROC_SERVICE_IS_OLD.
The attached revised patch has been tested on sparcv9-sun-solaris2.10,
sparcv9-sun-solaris2.11.4, amd64-pc-solaris2.10, amd64-pc-solaris2.11.4,
and x86_64-pc-linux-gnu.
I've also started an i386-pc-solaris2.9 build to check that it really
stops as expected.
PR gdb/22185
* configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
obsolete.
Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
Remove i386sol2 support.
* configure.nat <i386sol2>: Remove.
<sol2-64>: Fold into ...
<sol2>: ... this.
Move common settings to default section.
Add sol-thread.o.
* configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
x86_64-*-solaris2.1[0-9]*>: Rename to ...
<i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
<i[34567]86-*-solaris*>: Remove.
<sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
* configure.ac: Remove wctype in libw check.
(_MSE_INT_H): Don't define on Solaris 7-9.
<solaris*>: Remove libthread_db.so.1 check.
* configure: Regenerate.
* config.in: Regenerate.
* proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
(gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
(gdb_ps_size_t): Remove.
Use base types in users.
* sol-thread.c: Likewise, also for gdb_ps_addr_t.
* NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
|
|
Recent versions of NetBSD hide certain kernel structures needed by the
KVM target from userland unless this macro is defined.
gdb/ChangeLog:
* bsd-kvm.o: Define _KMEMUSER.
* configure.ac: Define _KMEMUSER when checking for "struct lwp".
* configure: Regenerate.
|
|
Version 2 of libipt adds an event system to instruction flow decoders and
deprecates indicating events via flags in struct pt_insn. Add configuration
checks to determine which version we have.
gdb/
* configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
and struct pt_insn.resynced.
* configure: Regenerated.
* config.in: Regenerated.
|
|
gdb/ChangeLog:
2017-05-17 Pedro Alves <palves@redhat.com>
* Makefile.in (nat_extra_makefile_frag): Rename to ...
(nat_makefile_frag): ... this. All references updated.
* configure.ac: Likewise.
* configure.nat: Likewise. Enhance comments.
* configure: Regenerate.
|
|
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
|
|
This commit adds a new function_view type. This type holds a
non-owning reference to a callable. It is meant to be used as
callback type of functions, instead of using the C-style pair of
function pointer and 'void *data' arguments. function_view allows
passing references to stateful function objects / lambdas with
captures as callbacks efficiently, while function pointer + 'void *'
does not.
See the intro in the new function-view.h header for more.
Unit tests included, put into a new gdb/unittests/ subdir.
gdb/ChangeLog:
2017-02-23 Pedro Alves <palves@redhat.com>
* Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
(%.o) <unittests/%.c>: New pattern.
* configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
* common/function-view.h: New file.
* unittests/function-view-selftests.c: New file.
* configure: Regenerate.
|
|
This applies the second part of GDB's End of Year Procedure, which
updates the copyright year range in all of GDB's files.
gdb/ChangeLog:
Update copyright year range in all GDB files.
|
|
All changes are limited to comments, and no run-time behavior is
affected.
bfd/ChangeLog:
2016-11-22 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
* warning.m4: Fix spelling in comments.
* configure.ac: Fix spelling in comments.
* configure: Regenerate.
binutils/ChangeLog:
2016-11-22 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
* configure: Regenerate.
gdb/ChangeLog:
2016-11-22 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
* configure.ac: Fix spelling in comments.
* configure: Regenerate.
gas/ChangeLog:
2016-11-22 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
* configure: Regenerate.
gold/ChangeLog:
2016-11-22 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
* configure: Regenerate.
gprof/ChangeLog:
2016-11-22 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
* configure: Regenerate.
ld/ChangeLog:
2016-11-22 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
* configure: Regenerate.
opcodes/ChangeLog:
2016-11-22 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
* configure: Regenerate.
|
|
Since GNU make is now required to build GDB, we can remove everything
that checks whether the current make implemention is the GNU one or
not. I simply removed the @GMAKE_TRUE@ prefixes and removed the whole
lines that were prefixed with @GMAKE_FALSE@.
I removed the code in the configure scripts that set those variables.
I also removed the following bits from the configure scripts:
AC_CHECK_PROGS(MAKE, make): GNU make already defines a MAKE variable
internally to be used when invoking Makefiles recursively. I don't see
this variable being used anywhere else (in scripts for example), so I
think it's safe for removal.
AC_PROG_MAKE_SET: This macro defines a SET_MAKE output variable, which
is meant to be used in Makefiles to define the MAKE variable when
using an implementation of make that doesn't already define it.
Since we are now requiring GNU make, we don't need it anymore.
Plus, I don't see SET_MAKE being used anywhere, so I don't think it
was actually doing anything...
gdb/ChangeLog:
* Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
make.
* configure.ac: Remove checks for the make program.
* configure: Re-generate.
gdb/gdbserver/ChangeLog:
* Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
make.
* configure.ac: Remove checks for the make program.
* configure: Re-generate.
gdb/testsuite/ChangeLog:
* Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
make.
* configure.ac: Remove checks for the make program.
* configure: Re-generate.
|
|
Complement commit 3831839c089c ("Delete IRIX support") and remove the
IRIX 5 <sys/proc.h> _KMEMUSER workaround from the `configure' script, as
IRIX is no longer a supported host configuration.
gdb/
* configure.ac <mips-sgi-irix5*>: Remove <sys/proc.h> _KMEMUSER
workaround.
* configure: Regenerate.
* config.in: Regenerate.
|
|
Use AX_CXX_COMPILE_STDCXX to detect if the compiler supports C++11,
and if -std=xxx switches are necessary to enable C++11.
We need to tweak AX_CXX_COMPILE_STDCXX a bit though. Pristine
upstream AX_CXX_COMPILE_STDCXX appends -std=gnu++11 to CXX directly.
That doesn't work for us, because the top level Makefile passes CXX
down to subdirs, and that overrides whatever gdb/Makefile may set CXX
to. The result would be that a make invocation from the build/gdb/
directory would use "g++ -std=gnu++11" as expected, while a make
invocation at the top level would not.
So instead of having AX_CXX_COMPILE_STDCXX set CXX directly, tweak it
to AC_SUBST a separate variable -- CXX_DIALECT -- and use '$(CXX)
(CXX_DIALECT)' to compile/link.
Confirmed that this enables C++11 starting with gcc 4.8, the first gcc
release with full C++11 support.
Also confirmed that configure errors out gracefully with older GCC
releases:
checking whether /opt/gcc-4.7/bin/g++ supports C++11 features by default... no
checking whether /opt/gcc-4.7/bin/g++ supports C++11 features with -std=gnu++11... no
checking whether /opt/gcc-4.7/bin/g++ supports C++11 features with -std=gnu++0x... no
checking whether /opt/gcc-4.7/bin/g++ supports C++11 features with -std=c++11... no
checking whether /opt/gcc-4.7/bin/g++ supports C++11 features with -std=c++0x... no
checking whether /opt/gcc-4.7/bin/g++ supports C++11 features with +std=c++11... no
checking whether /opt/gcc-4.7/bin/g++ supports C++11 features with -h std=c++11... no
configure: error: *** A compiler with support for C++11 language features is required.
Makefile:9451: recipe for target 'configure-gdb' failed
make[1]: *** [configure-gdb] Error 1
make[1]: Leaving directory '/home/pedro/brno/pedro/gdb/mygit/cxx-convertion/build-gcc-4.7'
If we need to revert back to making C++11 optional, all that's
necessary is to change the "mandatory" to "optional" in configure.ac
and regenerate configure (both gdb and gdbserver).
gdb/ChangeLog:
2016-10-28 Pedro Alves <palves@redhat.com>
* Makefile.in (CXX_DIALECT): Get from configure.
(COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
(FLAGS_TO_PASS): Pass CXX_DIALECT.
* acinclude.m4: Include ax_cxx_compile_stdcxx.m4.
* ax_cxx_compile_stdcxx.m4: Add FSF copyright header. Set and
AC_SUBST CXX_DIALECT instead of changing CXX/CXXCPP.
* configure.ac: Call AX_CXX_COMPILE_STDCXX.
* config.in: Regenerate.
* configure: Regenerate.
gdb/gdbserver/ChangeLog:
2016-10-28 Pedro Alves <palves@redhat.com>
* Makefile.in (CXX_DIALECT): Get from configure.
(COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
* acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
* configure.ac: Call AX_CXX_COMPILE_STDCXX.
* config.in: Regenerate.
* configure: Regenerate.
|
|
This removes all support for building gdb & gdbserver with a C
compiler from gdb & gdbserver's build machinery.
gdb/ChangeLog:
2016-09-05 Pedro Alves <palves@redhat.com>
* NEWS: Mention that a C++ compiler is now required.
* Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
(COMPILE.pre, CC_LD): Use CXX directly.
(INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
* acinclude.m4: Don't include build-with-cxx.m4.
* build-with-cxx.m4: Delete file.
* configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
* warning.m4: Assume $enable_build_with_cxx is yes.
* configure: Regenerate.
gdb/gdbserver/ChangeLog:
2016-09-05 Pedro Alves <palves@redhat.com>
* Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
(COMPILE.pre, CC_LD): Use CXX directly.
(INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
* acinclude.m4: Don't include build-with-cxx.m4.
* configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
* configure: Regenerate.
|
|
Implement support to add catchpoints for a group of related syscalls
using the syntax:
(gdb) catch syscall group:<group>
or
(gdb) catch syscall g:<group>
Several groups are predefined in the xml files for all architectures
supported by GDB over Linux. They are based on the groups defined by
strace.
gdb/
* xml-syscall.c (get_syscalls_by_group): New.
(get_syscall_group_names): New.
(struct syscall_group_desc): New structure to store group data.
(struct syscalls_info): Include field to store the group list.
(sysinfo_free_syscall_group_desc): New.
(free_syscalls_info): Free group list.
(syscall_group_create_syscall_group_desc): New.
(syscall_group_add_syscall): New.
(syscall_create_syscall_desc): Add syscall to its groups.
(syscall_start_syscall): Load group attribute.
(syscall_group_get_group_by_name): New.
(xml_list_syscalls_by_group): New.
(xml_list_of_groups): New.
* xml-syscall.h (get_syscalls_by_group): Export function
to retrieve a list of syscalls filtered by the group name.
(get_syscall_group_names): Export function to retrieve the list
of syscall groups.
* break-catch-syscall.c (catch_syscall_split_args): Verify if
argument is a syscall group and expand it to a list of syscalls
when creating catchpoints.
(catch_syscall_completer): Add word completion for system call
groups.
* configure.ac: Include dependency for xsltproc when building
in maintainer-mode.
* break-catch-syscall.c (_initialize_breakpoint): Update catch
syscall command documentation.
* NEWS: Include section about catching groups of syscalls.
* configure: Regenerate.
* data-directory/Makefile.in: Generate syscall xml when building
in maintainer mode.
* syscalls/gdb-syscalls.dtd: Include group attribute to the
syscall element.
* syscalls/apply-defaults.xsl: New.
* syscalls/linux-defaults.xml.in: New.
* syscalls/aarch64-linux.xml: Rename to aarch64-linux.xml.in.
* syscalls/amd64-linux.xml: Rename to amd64-linux.xml.in.
* syscalls/arm-linux.xml: Rename to arm-linux.xml.in.
* syscalls/bfin-linux.xml: Rename to bfin-linux.xml.in.
* syscalls/i386-linux.xml: Rename to i386-linux.xml.in.
* syscalls/mips-n32-linux.xml: Rename to mips-n32-linux.xml.in.
* syscalls/mips-n64-linux.xml: Rename to mips-n64-linux.xml.in.
* syscalls/mips-o32-linux.xml: Rename to mips-o32-linux.xml.in.
* syscalls/ppc-linux.xml: Rename to ppc-linux.xml.in.
* syscalls/ppc64-linux.xml: Rename to ppc64-linux.xml.in.
* syscalls/s390-linux.xml: Rename to s390-linux.xml.in.
* syscalls/s390x-linux.xml: Rename to s390x-linux.xml.in.
* syscalls/sparc-linux.xml: Rename to sparc-linux.xml.in.
* syscalls/sparc64-linux.xml: Rename to sparc64-linux.xml.in.
* syscalls/aarch64-linux.xml: Regenerate.
* syscalls/amd64-linux.xml: Regenerate.
* syscalls/arm-linux.xml: Regenerate.
* syscalls/i386-linux.xml: Regenerate.
* syscalls/mips-n32-linux.xml: Regenerate.
* syscalls/mips-n64-linux.xml: Regenerate.
* syscalls/mips-o32-linux.xml: Regenerate.
* syscalls/ppc-linux.xml: Regenerate.
* syscalls/ppc64-linux.xml: Regenerate.
* syscalls/s390-linux.xml: Regenerate.
* syscalls/s390x-linux.xml: Regenerate.
* syscalls/sparc-linux.xml: Regenerate.
* syscalls/sparc64-linux.xml: Regenerate.
gdb/testsuite/
* gdb.base/catch-syscall.exp (do_syscall_tests): Add call
to test_catch_syscall_group.
(test_catch_syscall_group): New.
gdb/doc/
* gdb.texinfo (Set Catchpoints): Add 'group' argument to catch
syscall.
|
|
Since:
commit 2d681be471cf8aff8f296cb7713c39e9aa4fc2bb
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
Date: Wed Apr 27 15:52:16 2016 +0200
Avoid non-C++-enabled babeltrace versions
tested with:
libbabeltrace-devel-1.2.4-4.fc24.x86_64
libbabeltrace-devel-1.4.0-2.fc25.x86_64
it can no longer build due to:
configure:16435: gcc -o conftest -m64 -g3 -pipe -Wall -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -fno-diagno
stics-show-caret -Werror -static-libstdc++ -static-libgcc conftest.c -ldl -ldl -lncurses -lm -ldl -lbabeltrace -lbabeltrace-ctf >&5
conftest.c: In function 'main':
conftest.c:208:7: error: 'pos' is a pointer; did you mean to use '->'?
gdb/ChangeLog
2016-07-05 Jan Kratochvil <jan.kratochvil@redhat.com>
* configure: Regenerate.
* configure.ac (HAVE_LIBBABELTRACE): Fix pos variable dereference.
|
|
All platforms on FreeBSD use a shared system call table, so use a
single XML file to describe the system calls available on each FreeBSD
platform.
Recent versions of FreeBSD include the identifier of the current
system call when reporting a system call entry or exit event in the
ptrace_lwpinfo structure obtained via PT_LWPINFO in fbsd_wait. As
such, FreeBSD native targets do not use the gdbarch method to fetch
the system call code. In addition, FreeBSD register sets fetched via
ptrace do not include an equivalent of 'orig_rax' (on amd64 for
example), so the system call code cannot be extracted from the
available registers during a system call exit. However, GDB assumes
that system call catch points are not supported if the gdbarch method
is not present. As a workaround, FreeBSD ABIs install a dummy gdbarch
method that throws an internal_error if it is ever invoked.
gdb/ChangeLog:
* configure.ac: Check for support for system call LWP fields on
FreeBSD.
* config.in, configure: Rebuild.
* data-directory/Makefile.in (SYSCALLS_FILES): Add freebsd.xml.
* fbsd-nat.c (fbsd_wait) [HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE]:
Report system call events.
[HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE]
(fbsd_set_syscall_catchpoint): New function.
(fbsd_nat_add_target) [HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE]:
Set "to_set_syscall_catchpoint" to "fbsd_set_syscall_catchpoint".
* fbsd-tdep.c: Include xml-syscall.h
(fbsd_get_syscall_number): New function.
(fbsd_init_abi): Set XML system call file name.
Add "get_syscall_number" gdbarch method.
* syscalls/freebsd.xml: New file.
|
|
GDB needs kinfo_getvmmap() on GNU/kFreeBSD systems same as on
pure FreeBSD. However on these systems the FreeBSD version of libutil
is renamed to libutil-freebsd.
2016-05-23 Jon Boden <jon@ubuntubsd.org>
* configure.ac: Search for libutil-freebsd as alternative to libutil.
* configure: Re-generated.
|
|
I wanted to unit test the Rust lexer, so I added a simple unit testing
command to gdb.
The intent is that self tests will only be compiled into gdb in
development mode. In release mode they simply won't exist. So, this
exposes $development to C code as GDB_SELF_TEST.
In development mode, test functions are registered with the self test
module. A test function is just a function that does some checks, and
throws an exception on failure.
Then this adds a new "maint selftest" command which invokes the test
functions, and a new dejagnu test case that invokes it.
2016-05-17 Tom Tromey <tom@tromey.com>
* NEWS: Add "maint selftest" entry.
* selftest.h: New file.
* selftest.c: New file.
* maint.c: Include selftest.h.
(maintenance_selftest): New function.
(_initialize_maint_cmds): Add "maint selftest" command.
* configure.ac (GDB_SELF_TEST): Maybe define.
* config.in, configure: Rebuild.
* Makefile.in (SFILES): Add selftest.c.
(COMMON_OBS): Add selftest.o.
2016-05-17 Tom Tromey <tom@tromey.com>
* gdb.texinfo (Maintenance Commands): Document "maint selftest".
2016-05-17 Tom Tromey <tom@tromey.com>
* gdb.gdb/unittest.exp: New file.
|
|
GDB's use of --dynamic-list to only export the proc-service symbols is
broken due to Python's "python-config --ldflags" saying we should link
with -export-dynamic, causing us to export _all_ extern symbols
anyway. On Fedora 23:
$ python-config --ldflags
-lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic
$ python3.4-config --ldflags
-L/usr/lib64 -lpython3.4m -lpthread -ldl -lutil -lm -Xlinker -export-dynamic
Having GDB export all its symbols leads to issues such as PR gdb/16818
(GDB crashes when using name for target remote hostname:port), where a
GDB symbol unintentionally preempts a symbol in one of the NSS modules
glibc loads into the process. NSS modules should not define symbols
outside the implementation namespace or the relevant standards, but,
alas, that's a longstanding and hard to fix issue. See libc-alpha
discussion at:
[symbol name space issues with NSS modules]
https://sourceware.org/ml/libc-alpha/2016-04/msg00130.html
Python should instead be either using GCC's symbol visibility feature
or -Wl,--dynamic-list as well, to only export Python API symbols, but,
it doesn't. There are bugs open upstream for that:
[Use -Wl,--dynamic-list=x.list, not -Xlinker -export-dynamic]
http://bugs.python.org/issue10112
[Use GCC visibility attrs in PyAPI_*]
http://bugs.python.org/issue11410
But that's taking a long while to resolve.
I thought of working around this Python issue by making GDB build with
-fvisibility=hidden, as Jan suggests in Python issue 10112, as then
Python's "-Xlinker -export-dynamic" has no effect. However, that
would need to be done in the whole source tree (bfd, libiberty, etc.),
and I think that would break GCC plugins, as I believe those have
access to all of GCCs symbols, by "design". So we'd need a new
configure switch, or have the libraries in the tree detect which of
GCC or GDB is being built, but that doesn't work, because the answer
can be "both" with combined builds...
So this patch instead works around Python's bug, by simply sed'ing
away "-Xlinker -export-dynamic" from the result of python-config.py
--ldflags, making -Wl,--dynamic-list work again as it used to. It's
ugly, but so is the bug...
Note that if -Wl,--dynamic-list doesn't work, we always link with
-rdynamic, so static Python should still work.
Tested on F23 with --python=python (Python 2.7) and
--python=python3.4.
gdb/ChangeLog:y
2016-05-03 Pedro Alves <palves@redhat.com>
* configure.ac (PYTHON_LIBS): Sed away "-Xlinker -export-dynamic".
* configure: Regenerate.
|