From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126019 invoked by alias); 6 May 2015 18:13:04 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 125941 invoked by uid 55); 6 May 2015 18:13:03 -0000 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug server/18081] gdbserver's message when providing an unexisting binary could be improved Date: Wed, 06 May 2015 18:13:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: server X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: palves at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q2/txt/msg00234.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18081 --- Comment #4 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Pedro Alves : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=80ad801e90b5bd389ec156d37e28228fcbca128c commit 80ad801e90b5bd389ec156d37e28228fcbca128c Author: Pedro Alves Date: Wed May 6 18:50:03 2015 +0100 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 PR server/18081 * server.c (start_inferior): If the process exits, mourn it. gdb/testsuite/ChangeLog: 2015-05-06 Pedro Alves PR server/18081 * gdb.server/non-existing-program.exp: New file. -- You are receiving this mail because: You are on the CC list for the bug.