From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9709 invoked by alias); 21 Aug 2019 15:31: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 9701 invoked by uid 89); 21 Aug 2019 15:31:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Aug 2019 15:31:41 +0000 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x7LFMnBW069425 for ; Wed, 21 Aug 2019 11:31:39 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2uh81xtbp7-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Aug 2019 11:31:38 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Aug 2019 16:31:37 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 21 Aug 2019 16:31:35 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x7LFVYEX51511432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Aug 2019 15:31:34 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 05C7BA405E; Wed, 21 Aug 2019 15:31:34 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E883CA4059; Wed, 21 Aug 2019 15:31:33 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.152.214.101]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 21 Aug 2019 15:31:33 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id B457CD802EF; Wed, 21 Aug 2019 17:31:33 +0200 (CEST) Subject: Re: [PATCH 3/3] [PowerPC] Fix debug register issues in ppc-linux-nat To: pedromfc@linux.ibm.com (Pedro Franco de Carvalho) Date: Wed, 21 Aug 2019 15:31:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <87ftm56uqg.fsf@linux.ibm.com> from "Pedro Franco de Carvalho" at Aug 13, 2019 10:49:27 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit x-cbid: 19082115-0008-0000-0000-0000030B8121 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19082115-0009-0000-0000-00004A29ACCB Message-Id: <20190821153133.B457CD802EF@oc3748833570.ibm.com> X-SW-Source: 2019-08/txt/msg00481.txt.bz2 Pedro Franco de Carvalho wrote: > I don't think this is the way the interface was intended to be used (see > linux/Documentation/powerpc/ptrace.txt), You're right. Any attempt to be "clever" like this must necessarily make assumptions that go beyond treating the return value of PTRACE_SETHWDEBUG as opaque handle. I didn't realize this ... > Is this an acceptable solution, or should we keep track of installed > slots across clones and forks? Given the above, I guess I now agree with your originally proposed solution to keep track of installed slots across clones and forks. The one question I still have is, given that we'll be deleting the installed breakpoints after a clone/fork anyway, wouldn't it be easier to just *delete* all breakpoints directly at the clone/fork callback and start out the GDB "installed" structures as empty? But that's just a minor detail ... whatever is easier to implement is fine with me. Since this really seems to be required on PowerPC due to the peculiar ptrace interface, I'm fine with adding the common code clone hook. Thanks, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com