From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78154 invoked by alias); 19 Feb 2020 13:46:13 -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 78067 invoked by uid 89); 19 Feb 2020 13:46:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=columns X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Feb 2020 13:46:11 +0000 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01JDfHDO070244 for ; Wed, 19 Feb 2020 08:46:10 -0500 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y8uckujuw-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 19 Feb 2020 08:46:09 -0500 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 19 Feb 2020 13:46:07 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 19 Feb 2020 13:46:05 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 01JDk1L831195180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Feb 2020 13:46:02 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D60FCAE059; Wed, 19 Feb 2020 13:46:01 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C3FC1AE051; Wed, 19 Feb 2020 13:46:01 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.152.98.90]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 19 Feb 2020 13:46:01 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id 810D0D802EA; Wed, 19 Feb 2020 14:46:01 +0100 (CET) Subject: Re: [PATCH v2 3/3] [PowerPC] Fix debug register issues in ppc-linux-nat To: pedromfc@linux.ibm.com (Pedro Franco de Carvalho) Date: Wed, 19 Feb 2020 13:46:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org, ulrich.weigand@de.ibm.com, rcardoso@linux.ibm.com In-Reply-To: <87lfoziqmw.fsf@linux.ibm.com> from "Pedro Franco de Carvalho" at Feb 18, 2020 05:31:35 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit x-cbid: 20021913-0016-0000-0000-000002E847F9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20021913-0017-0000-0000-0000334B6085 Message-Id: <20200219134601.810D0D802EA@oc3748833570.ibm.com> X-SW-Source: 2020-02/txt/msg00773.txt.bz2 Pedro Franco de Carvalho wrote: > "Ulrich Weigand" writes: > > > Can we simply store the installed slots map in here, instead of requiring > > a whole new per-lwp map in m_installed_hw_bps? > > I had considered doing this, however, low_new_fork needs to copy the > per-lwp state in case the debug registers are copied across forks, and > this function is called before the lwp_info object for the new forked > thread is constructed, which only happens in > linux_nat_target::follow_fork. Huh, indeed. It is strange that linux_handle_extended_wait creates the new lwp_info for PTRACE_EVENT_CLONE events, but *not* for PTRACE_EVENT_FORK / PTRACE_EVENT_VFORK. In the end, maybe everything would be simpler if we did that ... But that's probably not something that should hold up this patch, so I guess I'm fine with the extra list. > >> +ppc_linux_nat_target::hwdebug_point_cmp > >> +(const struct ppc_hw_breakpoint &a, const struct ppc_hw_breakpoint &b) > > > > You're using this style in a number of places, but I don't think this > > complies with the GNU coding style ... (The '(' should not be in the > > first column.) > > I will change this. I had done this because even if I broke the line > after the first argument, the line still had more than the soft limit of > columns (74): > > ppc_linux_nat_target::hwdebug_point_cmp (const struct ppc_hw_breakpoint &a, > const struct ppc_hw_breakpoint &b) As long as it's under 80 columns, I think this should be fine. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com