No description
Find a file
Joel Brobecker 6bd3187468 [PATCH] Unexpected EOF read from connection with GDB after inferior exits.
This is on GNU/Linux.

GDBserver does not exit properly when the inferior exits, as demonstrated
with any program using the procedure below:

   % gdbserver-head :4444 simple_main
   Process simple_main created; pid = 25681
   Listening on port 4444

Then, in another terminal, start GDB, connect to GDBserver, and run
the program to completion:

   % gdb-head simple_main
   (gdb) tar rem :4444
   (gdb) cont
   Continuing.

   Program exited normally.

Going back to the terminal where GDBserver is running, we see the following
output:

    Child exited with status 0
    readchar: Got EOF
    Remote side has terminated connection.  GDBserver will reopen the connection.
    Listening on port 4444

The problem is that we're missing a call to mourn_inferior.  As a result,
after we've handled the vCont packet, we fail to notice that there are
no process left to debug (target_running() returns true), and thus try
to continue reading from the remote socket.  However, since GDB just
disconnected after having received the "exit with status 0" reply to the
vCont request, the read triggers the EOF exception.

gdb/gdbserver/ChangeLog:

        * server.c (handle_v_cont): Call mourn_inferior if process
        just exited.
        (myresume): Likewise.
2010-07-07 16:14:04 +00:00
bfd daily update 2010-07-07 00:00:07 +00:00
binutils * readelf.c (uncompress_section_contents): Avoid gcc-4.6 warning. 2010-07-06 09:24:05 +00:00
config sync config/ChangeLog with gcc 2010-07-02 12:15:53 +00:00
cpu * m32c.cpu (f-dsp-8-s24): Mask high byte after shifting it. 2010-07-03 04:09:56 +00:00
elfcpp
etc
gas gas/ 2010-07-06 00:12:42 +00:00
gdb [PATCH] Unexpected EOF read from connection with GDB after inferior exits. 2010-07-07 16:14:04 +00:00
gold 2010-06-29 Doug Kwan <dougkwan@google.com> 2010-06-30 06:41:09 +00:00
gprof
include include/ChangeLog: 2010-07-06 12:56:24 +00:00
intl
ld bfd/ 2010-07-06 09:29:47 +00:00
libdecnumber
libiberty include/ChangeLog: 2010-07-06 12:56:24 +00:00
opcodes * mips-dis.c (print_insn_mips): Correct branch instruction type 2010-07-06 00:06:04 +00:00
readline
sim Add "acc" register. Revise register order and names. 2010-06-24 20:38:05 +00:00
texinfo
.cvsignore
ChangeLog
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
COPYING3
COPYING3.LIB
depcomp
djunpack.bat
install-sh
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
README
README-maintainer-mode
setup.com
src-release
symlink-tree
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.