Go to file
Tom de Vries 636ae5bb4b [gdb] Don't use gdb_stdlog for inferior-events
The test-case gdb.base/foll-vfork.exp contains:
...
if [gdb_debug_enabled] {
    untested "debug is enabled"
    return 0
}
...

To understand what it does, I disabled this bit and ran with GDB_DEBUG=infrun,
like so:
...
$ cd $build/gdb/testsuite
$ make check GDB_DEBUG=infrun RUNTESTFLAGS=gdb.base/foll-vfork.exp
...
and ran into:
...
(gdb) PASS: gdb.base/foll-vfork.exp: exec: \
  vfork parent follow, through step: set follow-fork parent
next^M
33        if (pid == 0) {^M
(gdb) FAIL: gdb.base/foll-vfork.exp: exec: \
  vfork parent follow, through step: step
...

The problem is that the test-case expects:
...
(gdb) PASS: gdb.base/foll-vfork.exp: exec: \
  vfork parent follow, through step: set follow-fork parent
next^M
[Detaching after vfork from child process 28169]^M
33        if (pid == 0) {^M
(gdb) PASS: gdb.base/foll-vfork.exp: exec: \
  vfork parent follow, through step: step
...
but the "Detaching" line has been redirected to
$outputs/gdb.base/foll-vfork/gdb.debug.

I looked at the documentation of "set logging debugredirect [on|off]":
...
  By default, GDB debug output will go to both the terminal and the logfile.
  Set debugredirect if you want debug output to go only to the log file.
...
and my interpretation of it was that "debug output" did not match the
"messages" description of inferior-events:
...
The set print inferior-events command allows you to enable or disable printing
of messages when GDB notices that new inferiors have started or that inferiors
have exited or have been detached.
...

Fix the discrepancy by not using gdb_stdlog for inferior-events.

Update the gdb.base/foll-vfork.exp test-case to not require
gdb_debug_enabled == 0.

Tested on x86_64-linux.

Tested test-case gdb.base/foll-vfork.exp with and without GDB_DEBUG=infrun.
2021-11-15 22:55:02 +01:00
bfd COFF: avoid modifications over C_FILE filename aux entries. 2021-11-15 23:07:11 +10:30
binutils Fix demangle style usage info 2021-11-12 14:33:31 +10:30
config
contrib
cpu
elfcpp
etc
gas Deal with full path in .file 0 directive 2021-11-15 12:56:10 +01:00
gdb [gdb] Don't use gdb_stdlog for inferior-events 2021-11-15 22:55:02 +01:00
gdbserver Fix build on rhES5 2021-11-09 08:21:18 -07:00
gdbsupport [gdb/build] Fix Wimplicit-exception-spec-mismatch in clang build 2021-11-11 11:22:39 +01:00
gnulib
gold -Waddress fixes for gold testsuite 2021-11-15 13:26:17 +10:30
gprof
include PowerPC64 @notoc in non-power10 code 2021-11-15 12:20:13 +10:30
intl Regenerate a couple of files 2021-11-15 12:20:12 +10:30
ld ld: Fix testsuite failures under --enable-textrel-check=error 2021-11-15 11:09:17 -08:00
libbacktrace sync libbacktrace from gcc 2021-11-14 18:07:50 +10:30
libctf doc/ctf-spec.texi: Remove "@validatemenus off" 2021-11-09 05:35:42 -08:00
libdecnumber
libiberty
opcodes Don't compile some opcodes files when bfd is 32-bit only 2021-11-12 19:02:12 +10:30
readline
sim sim: cris: make error message test a little more flexible 2021-11-15 03:34:36 -05:00
texinfo
zlib
.cvsignore
.gitattributes
.gitignore
ar-lib
ChangeLog
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
depcomp
djunpack.bat
install-sh
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def Import Makefile.def from gcc 2021-11-12 19:02:12 +10:30
Makefile.in Sync Makefile.tpl with GCC 2021-11-13 09:04:03 -08:00
Makefile.tpl Sync Makefile.tpl with GCC 2021-11-13 09:04:03 -08:00
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
README-maintainer-mode
setup.com
src-release.sh
symlink-tree
test-driver
ylwrap

		   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.