From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102624 invoked by alias); 26 Feb 2020 20:06:42 -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 102539 invoked by uid 89); 26 Feb 2020 20:06:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=September, september X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (207.211.31.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Feb 2020 20:06:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582747591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E8Josl3JqmqKXcH8b943d+lSJQf7AwCgciQ7vI0Zajs=; b=gqntDlw9FRKIBSIdqd+mq0VYrq6+Liys6Tfb3j7+0vvcr+gh52EUk8VXv3kxCTM693bMtK Gvq/LMQJRQX5aYj5CehwaeMNsf9F02wVQGX1SnDr3yTGjp+f5PiVhtUk4e1dahI5DOVcc2 QsgJXZkdGsgQmZWeyAxiS5IlPUpumIM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-235-lQBT5qMwNteY2qDWvIMqmQ-1; Wed, 26 Feb 2020 15:06:15 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E80D41005516; Wed, 26 Feb 2020 20:06:13 +0000 (UTC) Received: from psique.yyz.redhat.com (unused-10-15-17-54.yyz.redhat.com [10.15.17.54]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A7CA5DA76; Wed, 26 Feb 2020 20:06:10 +0000 (UTC) From: Sergio Durigan Junior To: GDB Patches Cc: Pedro Alves , Tom Tromey , Eli Zaretskii , Ruslan Kabatsayev , Sergio Durigan Junior Subject: [PATCH 0/6] Improve ptrace-error detection Date: Wed, 26 Feb 2020 20:06:00 -0000 Message-Id: <20200226200542.746617-1-sergiodj@redhat.com> In-Reply-To: <20190926042155.31481-1-sergiodj@redhat.com> References: <20190926042155.31481-1-sergiodj@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00993.txt.bz2 This patch series is the continuation of: [PATCH v5] Improve ptrace-error detection on Linux targets https://sourceware.org/ml/gdb-patches/2019-09/msg00504.html I decided to start a new series because this involved a rewrite of several parts of the patch. I addressed all of the comments I received back in September (mostly from Pedro), but I also did some improvements, especially in the 'fork_inferior' code. After submitting this series to our Buildbot, no regressions were found. Sergio Durigan Junior (6): Introduce scoped_pipe.h Don't reset errno/bfd_error on 'throw_perror_with_name' Expand 'fork_inferior' to check whether 'traceme_fun' succeeded Extend GNU/Linux to check for ptrace error Document Linux-specific possible ptrace restrictions Fix comment for 'gdb_dlopen' gdb/Makefile.in | 1 + gdb/doc/gdb.texinfo | 143 ++++++++++++++++ gdb/inf-ptrace.c | 18 +- gdb/linux-nat.c | 10 +- gdb/nat/fork-inferior.c | 231 ++++++++++++++++++++++++-- gdb/nat/fork-inferior.h | 87 ++++++++-- gdb/nat/linux-ptrace.c | 178 +++++++++++++++++++- gdb/nat/linux-ptrace.h | 27 ++- gdb/remote.c | 40 ++++- gdb/unittests/scoped_pipe-selftests.c | 96 +++++++++++ gdb/utils.c | 6 - gdbserver/linux-low.cc | 31 +++- gdbserver/server.cc | 38 ++++- gdbserver/thread-db.cc | 2 +- gdbserver/utils.cc | 2 + gdbsupport/gdb-dlfcn.h | 4 +- gdbsupport/scoped_pipe.h | 63 +++++++ 17 files changed, 909 insertions(+), 68 deletions(-) create mode 100644 gdb/unittests/scoped_pipe-selftests.c create mode 100644 gdbsupport/scoped_pipe.h --=20 2.24.1