binutils-gdb/gdb/testsuite/gdb.server
Pedro Alves 80ad801e90 PR server/18081: gdbserver crashes when providing an unexisting binary
$ ./gdbserver :1234 blah
 Process blah created; pid = 16471
 Cannot exec blah: No such file or directory.

 Child exited with status 127
 Killing process(es): 16471
 ../../../../src/binutils-gdb/gdb/gdbserver/linux-low.c:920: A problem internal to GDBserver has been detected.
 kill_wait_lwp: Assertion `res > 0' failed.

GDBserver shouldn't even be trying to kill that process.  GDBserver
kills or detaches from all processes on exit, and due to a missing
mourn_inferior call, GDBserver tries to kill the process that it had
already seen exit.

Tested on x86_64 Fedora 20.  New test included.  I emulated what
Windows outputs by hacking an error call in linux_create_inferior.

gdb/gdbserver/ChangeLog:
2015-05-06  Pedro Alves  <palves@redhat.com>

	PR server/18081
	* server.c (start_inferior): If the process exits, mourn it.

gdb/testsuite/ChangeLog:
2015-05-06  Pedro Alves  <palves@redhat.com>

	PR server/18081
	* gdb.server/non-existing-program.exp: New file.
2015-05-06 18:50:03 +01:00
..
ext-attach.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
ext-attach.exp skip "attach" tests when testing against stub-like targets 2015-01-09 11:04:19 +00:00
ext-run.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
file-transfer.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
Makefile.in
no-thread-db.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
no-thread-db.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
non-existing-program.exp PR server/18081: gdbserver crashes when providing an unexisting binary 2015-05-06 18:50:03 +01:00
server-exec-info.exp Access executable from remote system when first inferior appears 2015-04-17 09:47:30 +01:00
server-kill.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
server-kill.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
server-mon.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
server-run.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
server.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
solib-list-lib.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
solib-list-main.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
solib-list.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
transfer.txt
wrapper.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
wrapper.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00