From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by sourceware.org (Postfix) with ESMTP id 87A62385E006 for ; Fri, 27 Mar 2020 17:02:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 87A62385E006 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-48-6-5S3N3WO124_TuZWv6PJQ-1; Fri, 27 Mar 2020 13:02:42 -0400 X-MC-Unique: 6-5S3N3WO124_TuZWv6PJQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B3D7D18CA242 for ; Fri, 27 Mar 2020 17:02:41 +0000 (UTC) Received: from f31-4.lan (ovpn-115-20.phx2.redhat.com [10.3.115.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7FD701001B2D; Fri, 27 Mar 2020 17:02:38 +0000 (UTC) Date: Fri, 27 Mar 2020 10:02:38 -0700 From: Kevin Buettner To: gdb-patches@sourceware.org Subject: Re: [PATCH v2 4/5] Extend GNU/Linux to check for ptrace error Message-ID: <20200327100238.4428e5c4@f31-4.lan> In-Reply-To: <20200317154719.2078283-5-sergiodj@redhat.com> References: <20200226200542.746617-1-sergiodj@redhat.com> <20200317154719.2078283-1-sergiodj@redhat.com> <20200317154719.2078283-5-sergiodj@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 17:02:45 -0000 On Tue, 17 Mar 2020 11:47:18 -0400 Sergio Durigan Junior wrote: > + /* The user may be debugging remotely, so we have to warn that > + the instructions above should be performed in the target. */ > + string_appendf (ret, > + _("\n\ > +If you are debugging the inferior remotely, the ptrace restriction(s) must\n\ > +be disabled in the target system (e.g., where GDBserver is running).")); It seems to me that we ought to be able to know if the user is debugging remotely. If possible, I'd like to see a more targeted message when debugging remotely. The message can then be suppressed entirely for native debugging. The new message might look something like this: You are debugging the inferior remotely, so the ptrace restriction(s) must be disabled in the target system (i.e. where GDBserver is running). If that's not feasible for some reason, "e.g." should still be changed to "i.e.". Kevin