]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdbserver/ChangeLog
Fix for gdb.server/non-existing-program.exp test case
authorCarl E. Love <carll@oc4738070240.ibm.com>
Tue, 13 Sep 2016 16:41:54 +0000 (09:41 -0700)
committerCarl E. Love <carll@oc4738070240.ibm.com>
Tue, 13 Sep 2016 16:46:18 +0000 (09:46 -0700)
commit7313bced5b695b71a707c82b6817763046e21bb1
tree3cce427ae879b8c494fbb01d5cb78461ef36dfd1
parentf83683d5e8246251afaa89036ac0028adbd413b6
Fix for gdb.server/non-existing-program.exp test case

The test checks to make sure GDB exits cleanly if there is
no valid target binary.  Currently, ppc and S390 fail on this
test.  The function target_post_create_inferior () calls
linux_post_create_inferior () which calls the architecture
specific functions s390_arch_setup () and ppc_arch_setup ()
which make ptrace calls to access the architecture specific
registers.  These ptrace calls fail because the process does
not exist causing GDB to exit on error.

This patch checks to see if the initial ptrace (PTRACE_TRACEME, ...)
call returned a status of TARGET_WAITKIND_EXITED indicating the
target has already exited.  If the target has exited, then the
target_post_create_inferior () is not called since there is no
inferior to be setup.  The test to see if the initial ptrace
call succeeded is done after the ptrace (PTRACE_TRACEME, ...)
call and the wait for the inferior process to stop, assuming
it exists, has occurred.

The patch has been tested on X86 64-bit, ppc64 and s390.  If
fixes the test failures on ppc64 and s390.  The test does not
fail on X86 64-bit.  The patch does not introduce any additional
regression failures on any of these three platforms.

gdbserver/ChangeLog

2016-09-06  Carl Love  <cel@us.ibm.com>

* server.c (start_inferior):  Do not call
function target_post_create_inferior () if the
inferior process has already exited.
gdb/gdbserver/ChangeLog
gdb/gdbserver/server.c