Binutils with MCST patches
Go to file
Tom de Vries ee2a6fc604 [gdb/testsuite] Fix gdb.threads/watchpoint-fork.exp race
I ran into:
...
Thread 3.1 "watchpoint-fork" hit Breakpoint 3, marker () at \
  watchpoint-fork-mt.c:42^M
42      }^M
(gdb) parent2: 1945^M

FAIL: gdb.threads/watchpoint-fork.exp: child: multithreaded: breakpoint (A) \
  after the second fork (timeout)
...
The problem is that the FAILing gdb_test expects '(gdb) ' to be the last thing
printed, but the inferior prints something after that.

A similar FAIL is described in the sources in watchpoint-fork-parent.c:
...
      printf ("child%d: %d\n", nr, (int) getpid ());
      /* Delay to get both the "child%d" and "parent%d" message printed
      	 without a race breaking expect by its endless wait on `$gdb_prompt$':
         Breakpoint 3, marker () at watchpoint-fork.c:33
         33      }
         (gdb) parent2: 14223  */
      i = sleep (1);
...

I noticed that while the executables print output, the output is not verified in
the test-case, so it's merely debug output.

Fix this by:
- guarding the prints in the executables (as well as related
  sleep and setbuf calls) with #if DEBUG, and
- compiling by default with DEBUG=0.

gdb/testsuite/ChangeLog:

2020-01-29  Tom de Vries  <tdevries@suse.de>

	* gdb.threads/watchpoint-fork-child.c: Guard prints with #if DEBUG.
	* gdb.threads/watchpoint-fork-mt.c: Same.
	* gdb.threads/watchpoint-fork-parent.c: Same.
	* gdb.threads/watchpoint-fork-st.c: Same.
	* gdb.threads/watchpoint-fork.exp: Compile with DEBUG=0.

Change-Id: I63efd4c7771f96b5f5cd87ef2ab36795484ae2be
2020-01-29 08:48:53 +01:00
bfd Automatic date update in version.in 2020-01-29 00:00:42 +00:00
binutils Improve warning message from debuginfod support in readelf. 2020-01-28 11:30:55 +00:00
config Add markers for 2.34 branch to the NEWS files and ChangeLogs. 2020-01-18 13:50:25 +00:00
contrib contrib: Update dg-extract-results.* from gcc 2019-10-21 15:26:48 +01:00
cpu Add markers for 2.34 branch to the NEWS files and ChangeLogs. 2020-01-18 13:50:25 +00:00
elfcpp Add markers for 2.34 branch to the NEWS files and ChangeLogs. 2020-01-18 13:50:25 +00:00
etc texi2pod.pl: import support for @t{...} from gcc 2020-01-15 12:58:09 -05:00
gas x86-64: Properly encode and decode movsxd 2020-01-27 04:38:29 -08:00
gdb [gdb/testsuite] Fix gdb.threads/watchpoint-fork.exp race 2020-01-29 08:48:53 +01:00
gdbsupport Support the NetBSD version of pthread_setname_np 2020-01-24 16:39:01 +01:00
gnulib Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
gold Updated translations for various binutils sub-directories 2020-01-20 15:10:23 +00:00
gprof Updated translations for various binutils sub-directories. 2020-01-23 14:33:36 +00:00
include Add markers for 2.34 branch to the NEWS files and ChangeLogs. 2020-01-18 13:50:25 +00:00
intl Change version to 2.32.51 and regenerate configure and pot files. 2019-01-19 16:51:42 +00:00
ld PR25477, ld 2.34 tries to load ${prefix}/etc/ld.so.conf 2020-01-29 10:39:20 +10:30
libctf Add markers for 2.34 branch to the NEWS files and ChangeLogs. 2020-01-18 13:50:25 +00:00
libdecnumber Merge config/ changes from GCC. 2018-10-31 17:16:41 +00:00
libiberty Fix a libiberty testsuite failure. 2020-01-17 15:56:55 +00:00
opcodes x86-64: Properly encode and decode movsxd 2020-01-27 04:38:29 -08:00
readline Fix compilation of Readline on mingw.org's MinGW 2019-12-23 16:28:32 +02:00
sim MSP430: Fix simulator execution of RRUX instruction 2020-01-22 21:52:29 +00:00
texinfo
zlib Merge config/ changes from GCC. 2018-10-31 17:16:41 +00:00
.cvsignore
.gitattributes
.gitignore Add profiling outputs to .gitignore 2019-12-26 06:54:58 +01:00
COPYING
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
COPYING3
COPYING3.LIB
ChangeLog sim: don't rely on inferior_ptid in gdbsim_target::wait 2020-01-19 19:48:16 -05:00
MAINTAINERS Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
Makefile.def Make all-gdbsupport depend on all-bfd 2020-01-17 13:40:21 -05:00
Makefile.in Make all-gdbsupport depend on all-bfd 2020-01-17 13:40:21 -05:00
Makefile.tpl Revert "Sync top level files with versions from gcc." 2019-05-30 11:17:19 +01:00
README
README-maintainer-mode Bump to autoconf 2.69 and automake 1.15.1 2018-06-19 16:55:06 -04:00
ar-lib Bump to autoconf 2.69 and automake 1.15.1 2018-06-19 16:55:06 -04:00
compile
config-ml.in
config.guess Update top level config files with copies from the official repository. 2020-01-18 13:43:19 +00:00
config.rpath
config.sub Update top level config files with copies from the official repository. 2020-01-18 13:43:19 +00:00
configure Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
configure.ac Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
depcomp
djunpack.bat
install-sh
libtool.m4 Bump to autoconf 2.69 and automake 1.15.1 2018-06-19 16:55:06 -04:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am Merge autoconf / automake update changes from GCC. 2018-10-31 17:10:56 +00:00
setup.com
src-release.sh Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
symlink-tree
test-driver Bump to autoconf 2.69 and automake 1.15.1 2018-06-19 16:55:06 -04:00
ylwrap

README

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.