From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114730 invoked by alias); 16 Jun 2016 23:33:02 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 114701 invoked by uid 89); 16 Jun 2016 23:33:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=palves, hanging, Hx-languages-length:1838 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 16 Jun 2016 23:32:51 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1B09E80083 for ; Thu, 16 Jun 2016 23:32:50 +0000 (UTC) Received: from cascais.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5GNWmPW025383 for ; Thu, 16 Jun 2016 19:32:49 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH v4 0/3] Fix failure to detach if process exits while detaching on Linux Date: Thu, 16 Jun 2016 23:33:00 -0000 Message-Id: <1466119968-15171-1-git-send-email-palves@redhat.com> X-SW-Source: 2016-06/txt/msg00280.txt.bz2 This series picks up where https://sourceware.org/ml/gdb-patches/2016-06/msg00068.html left off. New in v4: - Handles failure to remove watchpoints / (prepare to resume). - Reworked to reap zombie lwps on failure to detach. Without this, gdb actually remains attached to the process. This can result in the process's parent hanging, if it is waiting for the child to exit. - Tests much extended. - Commit log tweaked / extended. Also pushed to users/palves/detach-gone-thread-v4, for convenience. ( Antoine, I rewrote the test substantially, and renamed it to process-dies-while-detaching.exp to mirror process-dies-while-handling-bp.exp, which is somewhat similar in spirit. You can easily see the differences from what we were working on earlier with: git diff -M origin/users/palves/detach-gone-thread-wip..origin/users/palves/detach-gone-thread-v4 ) gdb/breakpoint.c | 25 +- gdb/darwin-nat.c | 10 +- gdb/gdbserver/linux-low.c | 116 ++++++-- gdb/inf-ptrace.c | 20 +- gdb/inf-ptrace.h | 4 + gdb/infcmd.c | 7 + gdb/linux-nat.c | 152 ++++++---- gdb/nto-procfs.c | 11 +- gdb/remote.c | 10 +- gdb/target.c | 22 ++ gdb/target.h | 5 + gdb/testsuite/gdb.multi/watchpoint-multi-exit.c | 66 +++++ gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp | 87 ++++++ .../gdb.threads/process-dies-while-detaching.c | 116 ++++++++ .../gdb.threads/process-dies-while-detaching.exp | 327 +++++++++++++++++++++ 15 files changed, 864 insertions(+), 114 deletions(-) create mode 100644 gdb/testsuite/gdb.multi/watchpoint-multi-exit.c create mode 100644 gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp create mode 100644 gdb/testsuite/gdb.threads/process-dies-while-detaching.c create mode 100644 gdb/testsuite/gdb.threads/process-dies-while-detaching.exp -- 2.5.5