From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19824 invoked by alias); 20 Jun 2014 17:52:05 -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 19813 invoked by uid 89); 20 Jun 2014 17:52:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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; Fri, 20 Jun 2014 17:52:04 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5KHq3g7006874 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 20 Jun 2014 13:52:03 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5KHq1Xq009948; Fri, 20 Jun 2014 13:52:02 -0400 Message-ID: <53A474C1.9030305@redhat.com> Date: Fri, 20 Jun 2014 17:52:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Tom Tromey CC: "gdb-patches@sourceware.org" Subject: Re: [PATCH] x86 Linux watchpoints: Couldn't write debug register: Invalid, argument. References: <1394154640-14053-1-git-send-email-palves@redhat.com> <1394154640-14053-3-git-send-email-palves@redhat.com> <53272CB0.6050101@redhat.com> <532AF3D0.8090904@redhat.com> <20140617191850.GA10997@host2.jankratochvil.net> <20140619134330.GA14567@host2.jankratochvil.net> <53A2FB68.9090500@redhat.com> <53A3164E.4020109@redhat.com> <20140619170029.GA31275@host2.jankratochvil.net> <53A46706.8010601@redhat.com> <878uor8ofr.fsf@fleche.redhat.com> In-Reply-To: <878uor8ofr.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-06/txt/msg00777.txt.bz2 On 06/20/2014 06:45 PM, Tom Tromey wrote: >>>>>> "Pedro" == Pedro Alves writes: > > Pedro> I _still_ had to touch 3 different places with the same code... I'm > Pedro> very much looking forward to having all that merged. > > Yeah. In the meantime perhaps copying the comments into all 3 copies > would make it simpler for the eventual merge. I noticed that the > comments are not in linux-x86-low.c or i386-linux-nat.c. That's following the existing practice, actually. amd64-linux-nat.c has: /* On Linux kernel before 2.6.33 commit 72f674d203cd230426437cdcf7dd6f681dad8b0d if you enable a breakpoint by the DR_CONTROL bits you need to have already written the corresponding DR_FIRSTADDR...DR_LASTADDR registers. Ensure DR_CONTROL gets written as the very last register here. */ while i386-linux-nat.c just has: /* See amd64_linux_prepare_to_resume for Linux kernel note on i386_linux_dr_set calls ordering. */ I don't think trying to keep this in sync now would help, and at least this way we have one place that is master. Gary's recent series showed how when these comments are duplicated they end up diverging. :-/ -- Pedro Alves